It depends on what you are modeling. For example, is this a physics experiment where you have reason to believe that the outcome should follow a smooth curve? Then you will want to fit whichever trigonometric, polynomial, etc. functions.
I work at a hospital, where patient volumes follow seasonal patterns, and the changes are often abrupt. So I have indicator (dummy) variables for month, day of week, etc. Also, if a hospital added more beds or shut down a service on a certain day, there can be a sudden change in volume starting on that day. I've found step functions like these usually fit the data better than linear functions.