Lots of behavioural problems relate to a lack of self control. One of the ways you can help your dog to strengthen their self control, is to provide them with achievable tasks that they can perform.
In the sequence of pictures, treats have just been hidden around the garden. Chewy is very keen to go and find the treats, but the door does not open until she sits. She is not asked to sit, but has to offer the behaviour.
If she stays sitting, the door is opened and she is then released to find the treats. If she was to try to go through the door before being released, the door would be shut and not opened until she offered a sit again.
This is just one simple exercise. Incorporating self control exercises into a dogs day to day life (e.g. relaxed lead walking, appropriate greeting behaviour) can help to strengthen the dogs ability to perform self control.