Swinging Object

Does anyone know where I may find a tutorial on how to make an oblect swing from a center point like a picture hanging low on a nail with the naila s the center point?
Thanks
-josh