Crate training or getting a puppy pen teaches your puppy to stay in a space quietly playing or napping.
Socialize your puppy early. This will help puppies learn how to play with others appropriately and avoid behavioral problems later on.