Prove that $f$ is continuous at a if and only if $\lim _{h\to0} f (a + h) = f(a)$ This is a question from a calculus sample test, and I can't figure out how to prove it. Can I get some help from you guys?
Definition of continuity that we've learned is $$\lim_{x\to a} f(x) = f(a).$$
If that holds, then $f$ is continuous at $a$.
The definition that we learned of a limit is:
For every $\epsilon > 0$, there exists $\delta > 0$ such that $|x - a| < \delta$ implies $|f(x) - L| < \epsilon$.
$\epsilon$ and $\delta$, as far as I can tell, are just variables, $a$ is what $x$ is approaching, and $L$ is the limit.
 A: Have you tried the obvious guess, i.e. writing $x$ as $a+(x-a) = x$, and then noticing that $x \to a$ if and only if $h = x-a \to 0$?
A: OK. An obvious step you should take is plugging the definition into you question: 
$$\lim_{x\to a}f(x)=f(a)\qquad \text{if and only if} \qquad \lim_{h\to 0}f(a+h)=f(a)$$
As Gowers  recently said, I think this is a fake difficulty for you. In order to answer your question, I would like to ask you more basic questions:  

Do you know what does "if and only if" mean? Do you know the definitions of these two limits?

Now you can go on by yourself.
A: Here is my proof. Basically as others have said whenever you see "if and only if" you want to the statements imply each other. 
So suppose $f$ is continuous at $a$, then $\forall \epsilon > 0$, $\exists \delta > 0$ such that $|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$. In particular we want to show $\displaystyle\lim_{h\to0} f(a+h ) =f(a)$, so let us consider $|h - 0| < \delta$. Then we have $|h - 0| = |h| = |h + a - a| <\delta \implies |f(h + a) - f(a)| < \epsilon$ (here we sneakily let $x = h + a$) as desired.
On the other hand, let us assume we have $\displaystyle\lim_{h\to0} f(a+h ) =f(a)$ instead. Then $\forall \epsilon > 0, \exists \delta >0$ such that $|h| < \delta \implies|f(a+h) - f(a)| < \epsilon$. Consider $|x - a| < \delta \implies |f(x) - f(a)| = |f(a + (x - a)) - f(a)| < \epsilon$. Thus we have shown that the two are indeed equivalent (again we let $h = x-a$)
A: Here, we have:
$$ \lim_{h \to 0} f(a+h)$$
Put $$a+h=x$$
if $$h \to 0$$
then $$x \to a$$
So, now we have
$$\lim_{x \to a} f(x)$$
Note that this limit will be $f(a)$ if there is no discontinuity of any type in the curve. So, if
$$\lim_{x \to a} f(x)= \lim_{h \to 0} f(a+h)= f(a)$$
Then the function is continuous at $a$.
