Put heavy cream (whipping cream) in a mason jar or any container that you can easily shake that has a good seal. Anything that might pop open and spray cream everywhere is a bad idea.
After a couple minutes of shaking, the cream will take on the texture of a heavy, dense whipped cream. Keep shaking.
In a couple more minutes the cream will clump together into one big lump. Keep shaking.
Run very cold water and massage your butter in the running water. You want to get all the remaining out as milk will spoil the butter faster. Once the water runs clear, remove the butter from the stream of water and squeeze it a bit more to get as much water out as possible. I wrap my butter in parchment or waxed paper and freeze it at this point, but you can store it in a glass container in the fridge as well. Salting it will make it last longer; you can work a pinch of salt into the butter with a spatula in a small bowl or massage it in with your fingers.
Ta da! It's butter.