does a random variable always have a cumulative distribution function? I haven't taken a measure class so maybe my question is obvious.

I was wondering whether every random variable has a cdf, because for
  pdf it isn't always the case.

Moreover, do you know necessary condition for the existence of the pdf ?
 A: I'm assuming you're talking about real-valued random variables. The reason all random variables have a CDF is because of the definition. The CDF of a random variable, $X$, is the function,
$$F(t) = \mathbb{P}(X \leq t).$$
This function is well-defined for every random variable because the event $\{X \leq t\}$ is always well-defined and so we can take a probability.
The PDF is defined as the derivative of the CDF:
$$f(t) = \frac{d}{dt}F(t).$$
Naturally, if $F$ is not differentiable, then defining the PDF gets a little tricky. However, there are some workarounds. It turns out, even if $F$ is not everywhere differentiable, as long as it satisfies a condition called "absolute continuity", then the number of points where it's not differentiable is negligible, and they have no effect when we take integrals (which is all we really care about when we talk about PDfs). For example, we could let $X$ be a random variable on $[-1,1]$ with CDF,
$$F(t) = \begin{cases}
0&\text{ if } x \leq -1\\
\frac{x+1}{3} &\text{ if } -1 < x < 0\\
\frac{2x+1}{3} &\text{ if } 1 > x \geq 0\\
1 &\text{ if } x \geq 1
\end{cases}$$.
This is differentiable everywhere except $-1,0,1$, but we don't care about those points (all integrals involving $f$ do not depend on the value of $f$ at those points). Then our PDF becomes,
$$f(t) = \begin{cases}
1/3 &\text{ if } -1 < x < 0\\
2/3 &\text{ if } 1 > x > 0\\
0 &\text{ otherwise. }
\end{cases}$$
If $F$ is not continuous, then we get discrete distributions (with probability mass functions) or mixed distributions, but we don't get a PDF because discontinuous functions are not differentiable. Finally, if $F$ is not absolutely continuous, then the number of places where $F$ is not differentiable become big enough to impact integrals of $f$, so we say they don't have a PDF either. The standard example of this is the Cantor distribution which I'd recommend you look up if your interested (discussing that would be another long answer).
As for the definition of absolute continuity, I'd recommend looking it up as well. Wikipedia has a good article defining it and explaining exactly why it's so useful.
A: Yes, all random variables (defined in $\mathbb R$) have a CDF. The formal definition of a random variable involves the assignment of a measure ("probability") to any "measurable subset of possible outcomes" (informally, any not-too-pathological subset of the real line; including points and bounded/unbounded intervals ). Because the semi-infinite intervals $(-\infty, x]$ are among such "measurable" subsets, then each one will have a definite probability - which implies that the CDF is well defined.
For more details see https://en.wikipedia.org/wiki/Random_variable#Measure-theoretic_definition
Moreover, since the PDF (density) is defined as the derivative of the CDF, the necessary and sufficient condition for its existence (when we accept only true functions, not things like Dirac deltas) is, trivially, that the CDF is differentiable.
