I was playing with a few guys the other night and they gave me a basic run down of playing underneath another rythym by capoing the guitar at certain points and simply playing within given chord progressions and I got a taste of it and want to learn more so I have 2 questions

1] How do you know where to capo the guitar with a given key that someone else is playing in? is there anywhere to learn this? or maybe a list of "capo at 4 in the key of G" or something

2] How can I practice playing like this, I don't know many other players so the times I get to jam are few and far between? should i just play along with songs or what or are they some other ways to work on it.

thanks you all rock
i think u should:

1) if you can figure out what the root note of the song is (the root note is the note that the Key Chord comes from) you should try to play a solo based on the sccale of the root note i.e. if a song is in the key of G try playing a solo using notes from the G scales, or:

2) if you are not such a confident player, then you should try and make a chord structure to play underneath a solo or something like that.
right now I'm trying to do the play underneath thing, So would you capo at the root note and play out of that? for right now I think i'm better off just playing out of chords, I get lost amidst all the individual nights of I try to run through scales