How to use sandbags

How do you make the best use of sandbags to keep the water out of your home?