Modeling curves in nature? On my windowpane, I've traced the contour of a distant line of hills as they appear to an observer sitting in the sill. 
This short curve can of course be viewed as a continuous and single-valued function. Say that I were to draw coordinate axes on the pane, so that the left-most point of the curve is at the origin. Suppose I decided on a scale: Maybe I called the maximum value of the function $1$, and ticked off units along the $x$ and $y$ axes.
(1) What branch of mathematics is it that would allow me to approximate this function arbitrarily well? (2) My hand-drawn curve might be very poor--you'd need a computer model of the curve to scrutinize in order to approximate it by some function $f$, right? But wouldn't you need to first know the function in order to develop the computer model? Which comes first?
My background: I've completed the calculus sequence, linear algebra, and I'm starting real analysis. 
 A: The form of the function of course comes first; just as Kevin has said, it is an  approximation problem. People do this by least square approximation most of the time, that means you pick a form of a function, for example,
$$\frac{a}{b x^2 + c}$$
and then pick as many points as you want, said 1000 points, and calculate the values $a$, $b$, $c$ such that the error function is minimized. You can also do cubic spline, Bezier spline, etc. if you want. The name of the field that involves splines and computational geometry is CA(G)D (computer-aided (geometric) design); while another field are more heavy in theory and proof, which is called Approximation Theory. Check it out!
A: The first observation, which is close to something you said, is that you can't approximate the entirety of the curve until you have a rather detailed model-but to get a computer model, for instance, of the curve is almost the exact same problem as approximating it by a function! Instead, notice that when you're tracing a curve you're not really making decisions at every point, but simply interpolating between various points of interest, including but not limited to summits and transitions between hills. So your data is really a finite set of distinguished points, and you want to interpolate nicely between them. This is now a very tractable problem. The simplest answer is to take a piecewise linear interpolation, i.e. draw a line segment between consecutive distinguished points. A slightly richer but still quite elementary method is Lagrange interpolation, which gives a low-degree polynomial through all your points. In computer graphics much more elaborate methods are used, about which I don't know much, such as cubic splines.
