The exact way to discipline a puppy varies depending on the situation, but interrupting the behavior and redirecting the puppy is typically one of the most effective methods. Ignoring the puppy or leaving the room can be useful for some behaviors.
Puppies are still learning rules and boundaries, so methods of discipline should generally focus on showing them what you want. Setting them up for success by supervising them and trying to prevent unwanted behaviors is also important. When you cannot supervise your puppy, put it in a safe, puppy-proofed room or crate to prevent it from rehearsing unwanted behaviors. Discipline also needs to be paired with positive reinforcement for wanted behaviors.
Interrupting and redirecting can be as simple as firmly saying, "No!" and then telling the puppy what to do instead. For example, if the puppy is chewing on a shoe, take it away and give the puppy a toy to chew on instead.
Ignoring is useful for inappropriate play behaviors. Biting, jumping and barking are all normal puppy behaviors that humans find undesirable. The puppy's goal is to get attention, and any attention is usually positive, so completely ignoring the puppy teaches it that those behaviors are not successful.
Since puppies don't know the rules yet, physical punishment is usually not very effective. It can even cause problems, especially with house training. Puppies that are yelled at or hit when they have accidents in the house often simply hide from their owners when they have to urinate.