You should sand the wood before you put the stain on. On planed wood I would start out with 100 grit , followed by 150, and then if you want a very smooth finish hit it with 220 grit. You would then stain, followed by whatever top coat you are going to use. You would now sand with 220 grit between coats if you are using some form of polyurethane.