The official Team Fortress 2 wiki points to a YouTube video that breaks down how to play the Demoman well, and it is a better teacher than any short summary.
The broad strokes: the Demoman rewards good positioning and prediction. Direct hits with the grenade launcher, well-placed sticky traps and a well-timed charge turn a lone Scottish cyclops into one of the strongest classes in the game. Watch the video for the detail, then practise the sticky placement until it becomes instinct.