Insulating gaps left by windows and door installation
What you need to do is firstly go on and remove all the trim from around the door or the window, depending on what you want to insulate. This will show you the frame and basic structure and how it is positioned with the wall studs.
From here on, fill in the gap with insulation foam till it starts to ooze out. Wait for it to dry out and scrape off the excess. After doing so, place the trim back in place and you are good to go.
What you need to focus on during this part is to try and use the softer foam, since the harder types of foams won’t allow you to scrape them off easily, and they won’t leave room for the trim to go back into its place when you have to re attach it.
Insulating bigger areas
If you want to go on and fill in a much larger area with insulation like a whole wall, then you might need more fire power on your hands. A good way to go about this is to find the studs on the wall and to then make periodic holes along the wall, with intervals.
You can then stick the nozzle of the insulation foam blower in those holes and slowly move about as you go on and fill out the holes, and in turn add insulation to the whole wall.
In order to get the best possible results get a blower that will allow you to dispense larger amounts of foam in one go.