Having Blue Screen Problem in Compaq Presario Laptop

A few weeks ago, my uncle who lives in China gave me a present of a Compaq laptop that had Windows 7 already installed. The Windows had very high quality graphics at first.
However, after a few days, I came to realize that Windows 7 was not as easy to navigate as Windows XP.
Then I tried to install Windows XP after formatting the drive C:. For a while it worked okay, but now I have noticed some serious problems. A blue screen has popped up that says ‘physical memory error’.

How can I fix it?
