Remove all furniture from your deck in preparation for sanding.
Fit a disc or orbital sander with 60-grit sandpaper, if your deck has a lot of peeling paint. If your desk doesn't, skip this step and move on to the finer paper.
Put on ear protection and goggles. You'll make a lot of noise and generate a lot of debris. Protection is essential.
Turn on a belt sander and begin sanding the boards. With rough wood, work at a 45 degree angle to the wood grain to lift the paint. Don't press down; rely on the sander to do the work for you. Make long passes across the wood, overlapping slightly.
Sand with the grain after the initial pass and work until you've removed the paint.
Sweep the deck boards thoroughly to remove all debris.
Switch to 80- or 100-grit sandpaper for a finer cut. Again sand with the grain, using little pressure. Work over the wood until you see no splinters and feel no resistance from rough wood, covering the whole deck like this.
Use a vacuum cleaner or a pressure washer to remove all wood dust so you can paint or stain the deck without trapping wood dust beneath the finish.