Understanding the meaning of a function I am confused as to what really a function is ? 


Is a function the steps by which we get the output from an input ?  
Or is it the name of the process by which we get the output from an input ?
Simply put, a function is basically the description or the rule of the dependence  of the output on the input. It may also be seen as a mapping of the set $X$ - the domain to the set $Y$- the codomain. Notation-aly $f: X\mapsto Y$.

Take the example of $f(x)=x^2$. Let $X$ be the set of Real Numbers denoted $\mathbb{R}$. Clearly you can observe from the graph of $y=x^2$ that $f$ maps the input that is the real line to the positive real plane including $y=0$. Again, Notation-aly $f(x)=x^2 \mid f:\mathbb{R}\mapsto \mathbb{R^+}\cup \{0\}$. 

I would suggest you consult Wikipedia's page on Functions for deeper detail.
Consider the function $x\mapsto x^2$.  That describes the steps from input to output.  Now you may refer to that function by a name, say $f$, so you write $f\colon x\mapsto x^2$