When you buy a gun from a store is it registered in your name then?

Depends on where the store is located. In the US, all gun dealers maintain a record of the sale in their store for 20 years. In most states, there IS no government registration of firearms. In some, you must register the firearm with the state. Without knowing where you are, we can't give a more precise answer.