There are several types of functions. Functions that behave nicely when we differentiate them and those that behave nastily. Continuous everywhere and differential nowhere is an example of the later. See Weierstrass function
When we study Manifolds we would like to avoid nasty functions and restrict ourselves to nicer functions. "smooth" or $C^\infty$ functions meet this niceness criteria.
Then, the question is what are $C^\infty$ functions?
Before jumping into definition of $C^\infty$ functions, nice to look at another concept called "real-analytic".
"real-analytic" functions are functions that are equal to their Taylor series expansion in a neighborhood of a point $p$.
Taylor series expansion of a function $f(x)$ at a point $p$ is defined as
$f(x) = f(p) + \sum_i \frac{\partial{f}}{\partial(x^i)}|_p (x^i -p^i)+\sum_{i,j} \frac{1}{2!}\frac{\partial^2{f}}{\partial(x^i)\partial{x^j}}|_p (x^i-p^i)(x^j-p^j)+\cdots$
Clearly for a function to be real-analytic, we need the function to have infinite derivatives that are continuous at $p$. This leads to concept of $C^\infty$ functions.
For now, we consider that we are in $\mathcal{R}^n$ space. We represent coordinates in this space with superscripts - $(x^1,x^2\cdots,x^n)$. Thus a point $p$ is represented as $(p^1,p^2,\cdots ,p^n)$. We further assume that $p \in U \subset \mathcal{R^n}$ where $U$ is an open subset of $\mathcal{R^n}$.
To qualify as a $C^\infty$ function, we require function to have partial derivatives of all orders (all the way to infinity) at a point $p \in U$ and at $p$ the derivative must be continuous. If this is true for every point $p \in U$, then the function is $C^\infty$ on $U$.
Simplest examples of $C^\infty$ function are $sin(x), cos(x)$ etc.,
One caution - not all $C^\infty$ functions are real-analytic.