So basically they wipe the slate clean at the end of each tournemant and add on the new earned points
In theory, yes. In reality the schedule is often changed and occasionally some tournaments are moved (like Bucharest last year, or Madrid back in 2009 - it used to be a hard-court Masters in October). So some years the points will come off the week in advance, before the players get the chance to earn them back again the week after. If that makes sense.
so you want to match or do better than your last years performance in order to have same amount of points or more added after last years are removed??
Yep. Failing to get to the same stage means you will end up losing ranking points. Hence how players can often climb the rankings without even playing. So every tournament is either seen as a place to gain ground (if had a poor result the previous year, or didn't play), or try not to lose ground (a good result the previous year that will be hard or impossible to beat - ie Djokovic this week.)
I suppose that means Andy's Gold medal points also come off this Sunmer?? That's really rubbish given there's literally no way for him to earn them back this year.
Yep. The Olympics is obviously a one-off in that it's only every 4 years, so when it comes round no-one is defending anything from it, but equally what they gain will only last 1 year.
Right I'm off to calculate how many points Andy's defending at Miami and Indian Wells.
The ATP site is really good for that. Take a look at a player's Playing Activity - it lists all the tournaments he's played, who he faced, and how many ranking points he picked up (as well as his ranking at that time).
Here is Andy's:http://www.atpworldtour.com/Tennis/Players/Top-Players/Andy-Murray.aspx?t=pa&y=2012&m=s&e=0
That's set to 2012, so you can see all the points he won at each event, and thus what he's defending this year.