Drivers can gain points for race position, qualifying position and for getting the fastest lap of the race. In addition to this, they can also gain points for out-qualifying their team-mate and for finishing higher in the race than they started (ie having a better race position than qualifying position). The points are as follows:
Race and Qualifying
The driver who gets the fastest lap of the race gets 10pts
If a driver out-qualifies his team-mate, he gets 10pts. ie. The highest qualifier for each team gets 10pts.
Improving on qualifying position
For each place gained past 13th position, each driver gets 2pts. For example, a driver who qualifies 10th and finishes 5th gains 10pts, whilst a driver who qualifies 20th and finishes 12th gains just 2pts. You cannot lose points for going backwards.