Answer :

it runs out of momentoum so it stops swinging
When we swing a pendulam, it swings back and forth but eventually it stops. This is due friction with air. It is also because the kinetic energy released by the pendulam is dissipated into the air.