Assuming the cabinets are paint and stain free, sand lightly with the grain using a sanding block on larger flat sections or sandpaper wrapped around a finger for intricate sections. If you have a lot of cabinets, I'd advise you get a random-orbit sander with a velcrow pad and matching sanding disks in 100, 150 and 200 grits. The random-orbit sander allows you to sand in any direction on the grain without creating cross-grain scratches.
If the cabinets are in pretty good shape, I usually sand with a 150 grit paper, clean the dust off with a tack cloth then raise the grain with a very damp sponge. Water raises the grain. When the wood dries, I re-sand the raised grain with 200 grit paper then remove the dust with a tack cloth.
Before applying a stain, I use a sealer on the wood, especially if it's pine, luan or other soft or relatively soft woods. If you're going to stain oak you may have to use a filler - oak has large pores.
Then I apply a stain using a small throw-away rag or a soft paint brush. If using a darker stain or one I'm unfamiliar with, I leave it on the wood for only a short time before wiping the excess off with a clean, throw-away rag. Golden Oak and maple stains are considered light stains, mahogany is considered a dark stain. Strongly suggest you wear rubber, chemical gloves. You can always apply additional coats of stain to reach the desired shade you want.
Be advised, if you intend to apply a polyurethane protective finish as a final coat or coats, that each coat of polyurethane will darken your stain a little bit. And two coats of polyurethane is usually enough for a really good protective finish. Two coats of polyurethane will darken your stain about a half a shade. This will be more noticeable on lighter stains - oak or maple, for example.
If your cabinets have a finish on them already, you may need to remove the finish prior to staining.
If you are just sprucing up an already stained cabinet with the same shade of stain, you might be able to get by simply by thourghly cleaning the cabinets. For this I use Formula 409 and rough rags and fine steel wool then follow with a light sanding. The water and Formula 409 will raise the grain somewhat. You'll notice that on older cabinets, the areas around the handles will come out lighter than the areas that weren't touched as much. You'll need to leave stain on these areas somewhat longer when staining than the other areas in order to even out the coloring. Also, be advised that using this method - restaining over existing stain - will always result in a darker finish than what you originally started with.
If you want to remove all the prior finish - a very difficult if not impossible chore on stained wood - you will have to resort to using paint and stain remover. Paint remains on the surface so will eventually come off to bare wood. Stain, however, is just that, a stain that has penetrated the wood. There are two kinds of paint/stain remover: the environmentally friendly kind and the kind that will kill a moose. The former doesn't work at all in my opinion and is just a feel-good waste of money; the latter will work eventually, especially on paint and after multiple coats but doesn't work too well on stain. And, the stuff is dangerous. Work outside, wear old clothes, long sleeve shirts, long pants, shoes, chemical gloves, breathing mask and eye protection. Work on old newspapers or throw-away drop clothes, keeps children and animals away. Plan on it taking 4 times as long as you expect it to take. Frankly, I'd rather be beat in the butt with a dead rabbit than use paint remover.
Once you get the old finish removed, let the cabinets dry for a day or two then wash them off well with soap and water. Rinse, then let them dry. The grain will be raised. Sand with the finest sand paper that will do the job. Dush with a tack cloth then stain as explained above.