I'm assuming that when you say you have a graph you mean you have graphical representation (picture) of a function which by itself doesn't mean much (you can't do anything better than guessing).
On the other hand if you have specific function values y for some values of x, then you can approximate your function with some other function/functions. For example if your function looks like some polynomial (it's smooth and not periodical) you will use polynomials for your approximation, if your function is periodical, or has a lot of ups and downs you will most likely use trigonometric functions sine and cosine, if your function looks like exponential (grows very fast) you will use exponential functionfor your approximation... This is called interpolation.
You can also use spline interpolation. Most common are linear and cubic spline, but there are also other types e.g. trigonometric spline.
There are many ways to approximate a function. Function approximation is very important and large part of numarical mathematics. If you want to know more about this topic you can chack the following books:
Douglas N. Arnold, A Concise Introduction to Numerical Analysis
Tom M. Apostol, Calculus, vol. 2.
So only graphical representation of function tells you very little, but if you have exact function values at certain points you can do some approximation of your function.