...it doesnt erase them but it shouldnt no?
What are you asking??
For our intents and purposes, the way a game works is this:
1) A frame gets drawn to a buffer
2) The frame is rendered to the screen
3) Relevant parts of the buffer are erased (usually the whole thing is erased)
4) Everything is redrawn again o nthe erased buffer
5) The new frame is rendered to the screen
...and so on.
This happens typically 60 times per second.