A spring with original length L0 with a block at one end (another end is fixed).You can use mouse to drag the block to change it position.The spring will try to move back to it's equilibrium position.Spring force F= -k *(L-L0)

There is a friction force between block and the floor, Fr= -mu*m*g;

There are three curves show x(t), vx(t) and K(t)=(1/2)m vx2(t).Another spring will be drawn when you click show L0 , you can drag it to change the original length L0.