The right hand usually generates the sound, with a pick, fingernails or fingertips, and is responsible for timing and dynamics. There are no set rules, with the exception that 'proper' Classical guitar should only be played with fingernails.
Anyway, most rock, jazz and blues players play with a pick so we will start with that.
We'll talk about picks types in the strings and picks section, right now we will concentrate on how to hold a pick, or, more precisely, on how I hold a pick: every guitarist has his own way to use his right hand and the right way is what combines what comes natural to you and what is 'efficient', so I'll show you how I do it and tell you what you should avoid to do (in my opinion and experience).
Let's begin by joining your thumb and index finger in a sort of OK sign, as in figure 1: the tip of each finger should stick out from the other one less than a half inch.
Now try to hold the pick between your fingers and let the tip stick out from under the thumb by the same amount (Fig. 2).
Turn your hand around and the pick-finger configuration should look like Fig. 3.
I've seen players using both index and middle finger behind the pick and some keep their fingers straight, holding the pick almost with the tip of their thumb and index and they all play great. Find the position that feels comfortable and check that you can control the grip on the pick.
For single string picking and whenever I feel I need more control, I put my right pinky on the body of the guitar, on the pick guard, if there is one, as in Fig. 4 and use mostly my thumb and index fingers to do the actual picking movement and I hardly move my wrist or forearm at all.
The inner part of the forearm rests lightly on the top of the guitar's body. Your hand, wrist, arm and shoulder should feel relaxed and comfortable: make sure there is no tension.
Many other guitarists have a different approach and keep their fingers bunched up or splayed out (Figs. 5 and 6 respectively) and use more their wrist or even their forearm to pick.
I use those hand positions when I strum or play fast, funky chords using my splayed out fingers as a sort of pendulum and get an even timing. Whatever way you choose to play, always look out for tension and try to relax all your muscles from the shoulders to the fingers.
As I said, there is no right or wrong way to do it, you can watch videos of famous guitar players and you'll see every kind of picking style, you'll have to find your own.
So grab your pick and place its tip on the sixth string (Fig. 2), then apply enough pressure to actually pick the string and stop before hitting the fifth one, if you can.
Experiment using only your fingers or your wrist to move the pick, try and apply different 'pressures' or tighten and loosen your grip on the pick and hear the difference in volume and attack. Pick every single string and feel the different resistance it offers to your touch.
Now try an upstroke: place the pick under a string and move it upwards in a reverse motion, picking it from below. Then play a downstroke and an upstroke on the same string.
Ready for your first strum? Move your wrist upwards, parallel to the guitar's body, so the pick is a half inch above the sixth string and then flick it downwards, picking all of the strings one after the other in a sweeping motion, stop for a second and then flick your wrist back up for an upward strum. Try different speeds (a slow strum, a fast one) and vary the pressure of your fingers on the pick and again listen to the variations in sound.
Experiment, have fun, try to feel what's the right movement for you, the right hand position, the right way to hold the pick until it becomes familiar.
Then you can go to the picking and strumming section for some real exercises.
Playing with your fingers is a different kind of approach and it's not restricted to 'finger picking' styles or classical guitar, there are a few great rock guitar players that use their fingers all the time.
Of course there is also the hybrid approach where you use a pick and your middle and ring finger at the same time that is used in a great variety of styles.
In Fig. 7 you can see the 'standard' finger picking position: the thumb is parallel to the strings and the other fingers are bunched up in a claw like manner. I prefer using my fingernails as they give more attack to the notes but it's not strictly necessary.
In some styles the heel of the right hand rests on the lower strings, close to the bridge, to dampen the lower bass lines.
Any style of finger picking lets you play both melody and comping at the same time, like a piano.
For Classical guitar we bend the wrist downward so the 4 fingers are perpendicular to the strings and the last two phalanxes are almost straight so the fingernails pick the strings from below allowing for a fuller sound and more agility. Fingernails are not an option in this style but they shouldn't be too long.
Hybrid picking, also reffered to as 'chicken picking' is another very popular technique where we use both the pick and middle and ring finger (the pinky is rarely used). It originated in Blues and Country music but is now widely spread in every style, both on acoustic and electric guitar.
Use Fig. 4 as a starting point (with or without your pinky on the top of the body) and use the pick for the lower strings and your fingers for the higher ones.
But it's too early to go into details, we still need another essential component of our sound: the left hand.