The basic principle of dog training is simple. Reward your dog consistently for a behaviour and he will repeat it. This is positive reinforcement. If the consequence of his behaviour is unrewarding, he will stop doing that behaviour. This is negative reinforcement.
Either reinforcement must be applied immediately or during the behaviour, to be effective. Used in tandem, both positive and negative reinforcements are powerful tools to use in dog training. For instance, if the dog jumps on you, negative reinforcement can get him to stop, but it will not teach him what to do instead. This is where positive reinforcement comes in. Positive reinforcement teaches your dog how to behave. He is lured into the desired behaviour and rewarded. The dog quickly catches on that a certain behaviour always brings him rewards, and he will give you that behaviour.
So, if you have used positive reinforcement to teach him a sit and you correct him for jumping, he will sit because you have taught him that sitting brings rewards. Negative reinforcement is a correction applied to a dog during an unwanted behaviour. Negative reinforcement occurs when a certain stimulus, is removed after a particular behaviour is exhibited. The likelihood of this behaviour occurring again in the future is increased because of removing/avoiding the negative consequence. Negative reinforcement is not punishment. With negative reinforcement, you are increasing a behaviour, whereas, with punishment, you are decreasing a behaviour. It is an instructive correction and can only be used if your dog has previously been taught what is correct for him to do. It should not use cruel methods but simply be a withdrawal of a reward.
When I teach leash walking, as long as the dog is walking on a loose leash, I will be praising him, the moment he pulls, I will stand still and stop the praising. I will wait until the leash is loose again, and then resume the praise and the walk. The negative reinforcement here is the cessation of movement and praise. The positive reinforcement is the praise and resumption of the walk.