Modeling a spring is a bit complicated, especially if you want it to be adjustable in length based upon the amount of compression. But, once you've got a model, it's very easy to re-use it for different sizes and spring conditions.
Here is an example created in Creo 4.0. Not saying it is the best spring example but will do what you are asking.
Relations are used to define many of the dimensions. It is also setup with predefined flexibility so that, when you add it to an assembly, you will be prompted to use flexibility.