Pin 3 of the LCD is the contrast adjusting pin. It can be connected to ground directly or through a fixed resistor sized to provide good contrast. See this thread
A potentiometer is best because the contrast can chage with changes in supply voltage or temprature. The pot allows easy contrast adjustment.