Recording live (along with a band) vocals is tricky business. Vocals are typically compressed and EQ`d during the mix so the sound of other instruments that find their way into the vocal mic get that treatment as well. The results are usually bad. When recording live in the studio, you'll want to get the vocalist behind some kind of barrier or in another room if possible to get better isolation. Reducing or eliminating the line-of-sight with the other players can often degrade the performance so you'll need to strike a balance. If you must record the vocals in the same room as the band, use a mic with a tight uni-directional pickup pattern. The Wikipedia entry on microphones has great information on microphone directionality/polar patterns.
Often the live vocal track is only uses as a guide and is not used in the final mix. The next section describes overdubbed vocal tracks.
Most vocals are overdubbed in a seperate session from the backing tracks. The vocalist will usually be provided a mix of the backing tracks in a pair of headphones. The sound coming from the headphones gets compressed in the singer's ear making it difficult to stay in pitch so It's best to only use one ear. This leaves the other ear free to hear the actual voice.
For traditional pop music, you'll want to place the mic 3-10" from the singers mouth and use a wind screen if possible (a nylon over a coat hanger will do in a pinch). In-your-face vocal sound might require the singer getting very close to, or touching the mic.
Many recording programs support loop recording which allows you to loop over a specific section recording a seperate take for each. You then go back and copy the best take into the working track.
There are literally hundreds of different mics to record with but the final selection really comes down to your budget and the style of music. Large diaphram condensers or ribbon mics are great for traditional vocal recordings while dynamics such as the Shure SM57 and Beta57 are good for in-your-face recordings. See the Microphones page for more info.
Getting a vocal track to sound right in a mix can be a bitch. You'll always want to provide some compression on the vocal along with some EQ. The details beyond that depend a lot on the style of music and the sound you are going for. Typically, you'll roll off the low and the very high ends to keep the vocal from stepping on low frequency instruments (bass, kick, etc..) as well as those in the mid-low range (keys, drums, guitar, etc..).
Compressor plug ins will usually get you part of the way towards a good sounding lead vocal but you might find that you need to do additionaly tweaking of the level of the vocal track in the recording applications mix automation.
For dramaticly tight sounding vocals you can even consider using multiband compressor which compresses lows, mids and highs seperately.