Dogs learn faster and are better at solving new puzzles when they are trained with positive reinforcement techniques. Just like young children, dogs often misbehave because they have a hard time understanding what is expected of them. Providing clear, consistent direction and immediate positive feedback when a desired behavior is performed will make training for you and Fido a pleasant experience.
When teaching a new trick or command, get your dog's attention by gently calling their name. Your tone of voice tells them that this new work is fun! Using your chosen word (sit, stay, etc.) and a really extra special yummy treat, ask for the behavior. Try moving a treat above the head, towards the back to get a nose to go up in the air (and a tail on the floor) for sit, or a flat, palm-out hand with a low, drawn out "staaaaay" while taking one step back to help shape the behavior without trying to physically force the dog into position. Physically moving the dog into position can be interpreted as play, which is great fun for Fido, and greatly frustrating to you!
When trying to teach a dog to stop an existing behavior, use behavior extinction or substitution. Behavior extinction works for things like jumping or excessive attention-seeking barking, which are behaviors Fido uses to get your attention - either cheerful or grumpy will do! Ignoring the behavior completely (without the use of "no", "off", "down" or physical touch like pushing down). Follow your stonewalling with an immediate reward of attention when the dog ceases the obnoxious behavior. You'll see them try even harder a few times, but they will quickly realize that the path to love and attention is through the calm behavior you want!