# What's the relation between Stirling numbers and the generating functions?

I just started studying higher combinatorics, but until now in the combinatorial sense I had only seen binomial theorem and coefficients. Therefore, I'm having a lot of difficulty in grasping the materials. I recently studies Stirling numbers of the first kind and second kind, though I mostly concentrated on the second kind, and I learned that something like $S_{n,k}$ let's us partition $n$ elements into exactly $k$-partitions. For example, if $n=4$, and $k=2$, then we can partition the $4$ element set into two partitions, either making one partition contain $1$ element and the other $3$ element, or making both of the partitions contain $2$ elements, where I also saw that $S{n,2} = 2^{n-1}-1$.

Anyway, now I entered into the realm of generating functions, and I don't exactly understand what are they, why we need them, and particularly what are their relation with Stirling numbers that I studied lately? I know that this seems like a broad question, but I would like to hear something about this connection. I have already been reading book, and checking Wikipedia, but it is still not clear to me.