Whenever the work done by a force can be defined in terms of potential energy the force is a conservative force. A conservative force conserves energy. The force of gravity is a good example.
To determine whether a force is conservative, consider what happens during a round trip. If the object returns to its starting point with the same kinetic energy it had when it left, and it moves under the influenec of a single force, that force is conservative.
Another way to tell that a force is conservative is that changes in kinetic energy should be path-independent. If an object moves from point A to point B and experiences a particular change in kinetic energy, all other routes from A to B will result in the same change in kinetic energy due to the conservative force.
Forces applied by springs are conservative, so we'll define a potential energy for springs. The other forces we've dealt with (friction, tension, normal) are non-conservative.