RAM is used by the software you run, which includes the operating system. I'm guessing your OS is using most, if not all, of that 512 mb. The more applications you run simultaneously, the more RAM the system needs.
There was a time when 512 mb was a lot of memory, but not by today's standards. As applications mature, the more resource-hungry they become. I strongly recommend you add as much RAM as possible. It's the cheapest, most efficient way to boost performance.