In Photoshop, just use the
Pen Tool -- it sounds like you are a beginner so I'd recommend checking out some tutorials.
Here is a good one that goes over creating your own shapes in Photoshop.
To address the images you've linked, I would split that up into 5 layers. One for the background, the back mountains, their shading, the front mountains, and their shading.
Since the mountains are a single color (aside from the shading) you can use a single shape for them. Then I'd create multiple "shading" shades on top to give the mountains depth.