Kudos for expanding your musical horizons by learning the guitar. I find it to be one of the most versatile musical instruments available.
A capo is not required to play a song on guitar in any key you desire but will make it much easier to play in certain keys. The way a guitar and similar fretted stringed instruments are set up makes it difficult to play certain chords in certain keys. Many professional musicians even use a capo - although some very accomplished and experienced guitarist consider the use of a capo akin to riding a bicycle with training wheels.
But as a beginning guitar student, you will find that the capo is your friend and will greatly reduce the learning curve.
I feel like the chord formations for playing guitar in the key of G are the easiest for a beginning student to learn. So if you learn the G, C, and D major chords and the Em and Am chords which can all be played as open chords, you will be able to play most songs in the key of G. Later you can add the Bm Barre chord to play even more songs. Once you learn these chord formations, you can transpose to other keys simply by using a capo and playing those same chord formations. Put the capo on the 2nd fret and play the same chords - now you are in the key of A. Capo third fret = Bb, fourth fret = B, fifth fret = C and so on. Unfortunately things start getting tight past the 7th fret.
But after you learn the first position chords to play guitar in the key of G, the next easiest to play for most beginning guitar students would be the chords in the key of C.
But - to play the chords in the key of C you must master the dreaded F chord. It's difficult mainly because it involves barring either 2 or 6 strings (depending on if you play the 4 string version or full barre chord) on the first fret which is harder than the second fret or third fret because the nut raises the strings above the fret board and that close to the nut it is harder to press the strings down to the frets. The good news though, is that using a capo to transpose to other keys from C, actually makes the F chord shape easier to play than without the capo. This is because the capo lowers the height of the strings down to the fret it's behind and thus closer to the fret board than the height of the strings at the nut.
If you learn the basic first position chords for the key of G and C (most are open chords), the capo will allow you to play in all the major keys with just those chords.
As you continue learning chords in other keys, the capo will allow you to achieve different nuances for songs in a given key by using the capo and different chord formations to alter the voicing used for the chords.
Or you may find certain transitions between chords in a particular song easier to play using the chords of G versus the chords of A for example - so you could put a capo on the second fret and play as if in G - even though you may be capable of playing the chords in the key of A.
Beyond making certain keys much easier to play in, the capo also gives you more options - even as you become more experienced and expand your chord vocabulary.
Enjoy your journey.