That would depend entirely on what exactly you are sanding/painting. Plywood is a completely different beast from MDF, which is also completely different than OSB, and if it's plywood, it will depend on what wood is on the face. Birch, oak, and pine are the most common. Birch and pine can be treated pretty much the same, but oak is an entirely different story.
Most good plywood is pre-sanded and ready to paint (cheap pine plywood will need sanded), and MDF does not generally need sanded either. It all depends on the surface quality of the material you are working with. Both need painted with a wood sealer before the final paint color, or you'll go through WAY more paint than you expect, as the first coat or three will soak into the wood and not leave a good finish. It also depends on what kind of paint you plan on using. Water based paints are much easier to deal with than oil based, but are not generally as durable.
Also, don't skimp on paint brushes. Yes, you can buy a giant pack of brushes for a few dollars at Harbor Freight or Dollar General, but they won't hold up as well and you won't get nearly as good a finish quality as with a good paintbrush. Make sure you read the information on the paint can or talk to someone in the paint department where you will be purchasing the paint to make sure you get the correct type of brushes for the paint you will be using also. Oil based paints can destroy a brush that isn't meant for use with them.
If you are going to use cheap pine plywood instead of good sanded birch faced plywood, you'll want a decent random orbit sander if you don't want to work your arms to death. Start with maybe a 60-80 grit sandpaper to smooth out the worst of the rough patches. Be careful to use light pressure and don't spend too long in one spot or you'll sand through the face layer, the layers are rather thin. Let the sander do the work. Then step up to a 120-160 grit to smooth out the surface, then a quick finish pass with a 300-400 grit. When your finished, wipe the sanded faces down with a damp (not soaked and dripping) wrung out cloth to remove the sanding dust. Make sure the face has dried before you start painting.
Follow the instructions on the can of sealant and apply that once the faces are clean and dry. Depending on the sealent, you may need to hit the faces with the 300-400 grit sandpaper very lightly again after it has had ample time to dry before painting as they tend to lift the grain of the wood a bit. Same routine, wipe down with a damp cloth to remove the sanding dust before continuing to paint.
Apply the paint with even brush strokes. Make sure the brush doesn't get too dry, or you'll leave brush marks. Also make sure you don't apply the paint too heavily or you will have puddles or runs. You will likely need at least two coats to get a good finish. Again, follow the instructions on your paint and make sure it has ample time to dry between coats. This is the part that takes practice. You can read everything ever written about painting, but the only thing that will make you a good painter is practice.
Practice on scrap before you start on the real thing. Never throw away scrap lumber, you never know when it will come in handy.
Also, don't be surprised if you get at least a dozen other opinions on how to prep and paint lumber. Everyone has there own technique that works for them, and rarely do two people do it exactly the same way.