The first one is to stain the wood and then apply some form of clear finish over the top.
The second one is to paint it a solid colour.
For both options you'll first need to get some grain filler and apply that to the mahogany of the body and neck to fill in all the open pores in the wood, then sand it back so the surface is flat.