Lightly dampen the wood surface to raise any parts of the grain that will swell when the wood absorbs any moisture, and then sand it using 400-grit sandpaper.
Applying a pre-stain conditioner is a good idea. This also creates a thin seal over the wood surface and makes applying the pine wood stain that much easier.
Each wood stain product is different, so read the label directions before you start. Some can be applied using a cloth or sponge, while others are brushed, rolled, or sprayed on.