Chords are learnt with the help of a chord diagram. This will show you exactly where to place your left hand fingers in order to play a particular chord. A chord diagram is a grid of horizontal and vertical lines representing the strings and frets of the guitar as shown below.
A dotted string indicates that string is not to be strummed. An X on the string indicates taht string is to dampened by another finger lightly touching rt The string is still strummed as a part of the chord but it is not heard. A small bar connecting several black dots indicates they are held down by the same finger. This is called barring.