Fitting, Plotting Functions

How do I fit a function to data?