Neither of these are important.
You have two main types of memory:
RAM
hard drive
Everything is stored permanently on your hard drive. However, this is a mechanical thing and is very slow. So, to make your computer work faster you also have RAM. This uses microchips with no moving parts, so runs much faster. When you turn your computer on, or load a program or open a file, it gets moved from hard drive to RAM. If you save the file, then it'll get moved back from RAM onto your hard drive. The problem with RAM is that it's known as 'volatile memory', which means that when the power goes, so does its memory. This is why you can be typing a letter and have a power cut and lose it. If you'd saved it earlier, it would be on your hard drive too, which doesn't lose its memory so easily.
Now, the 512MB you talk about ('physical memory') is your RAM. This is often not enough for everything you want to do with your computer in one go (you may want to have several programs open at once for instance, say Word and Excel). So your computer creates 'virtual memory', which is a small part of your hard drive, 'borrowed' to pretend it's like having more RAM to use. This is your 2GB figure that you quote.
In order to install more games, you need neither more RAM or more virtual memory -- instead, you need plenty of free space on your hard drive (to store the game, like it stores everything else). You can find out how much room you have on your hard drive by going into My Computer, and you'll find your hard drive there (probably called C drive): right-click it, and click properties. In the dialog box that appears, you'll find your total size of your hard drive, as well as the free space available on it.