This stuff expands a lot, so the trick is to spray a little and keep it moving along any given edge/space. After it dries (we gave it a good 3-4 hours), you can then go along the edges with a utility knife and scrape until even with your wall, floor, etc.
Here's a comprehensive list of where to use foam sealant, including:
- Under baseboards
- Window and door frames
- Electrical outlets
- Pipe/wire penetrations
- Conduit penetrations
- Air/heating vents
A can of Great Stuff runs anywhere from $2.99 (we've seen it on sale) to $5.50. Make sure you have a spray plan before starting; once you open a can you need to use the whole thing.