When I draw my maps, I always start out with a fresh sheet of paper, and I just sketch out a random shape for a continent, so mostly it's doodling for me. When I'm happy with the outline I draw in rivers and lakes, mountains and forests, and finally the cities, towns and ports.
Usually, I like to have a map sketched out before I start writing, even if it isn't a complete world map, just one continent. It gives me ideas about the shape the story should take, because I can visualize journeys and such from it. If the story requires it, you can then look for ideal places where a big battle could take place, or if the characters need to hide/flee. That's just the way I do it, though.