What kind of wooden fence is this and how do I go about staining it?
Blast it clean with a garden hose to remove surface dirt, then use a high quality exterior semi-transparent stain of the color of your choice. Use a good quality brush, a nice wide one, and know that you should use a back-brush technique; that is, you will apply the stain in both and up and down brushing motion, due to the rough-sawn nature of the wood. No sanding necessary.

The pressure-treated posts and the fence boards will not look exactly the same because they are different types of wood, but it will not detract from the beauty of your fence.