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.
Always make sure your pet is on a leash when you are outside, unless you are in a safe and secure fenced in area.