Right, lets say your playing space invaders. (Programmers may take issue with this, but its as simple an explanation I can muster offhand.)
You start the game, and you create a "player" and 40 "invaders", each takes 10kb of memory, so you are using 410kb.
The player shoots 5 invaders. The invaders are removed from the games.
Garbage collection happens, and the memory allocated to those invaders is freed up. You are now using 360kb of memory.
Continue until all invaders are dead, and then respawn a new wave of invaders (putting you back at 410kb).
In the real world it'd probably be more efficient to simply toggle "on" and "off" switches rather than creating and destroying invaders every round, but you (hopefully) get the general idea.