Using friends old HDD

My HDD crashed awhile ago so I bought a 500gb off my friend to use as a replacment. I installed the HDD and when I started the computer it Loading windows on new computer or something like that. So then in that same screen an error poped up saying I need to contact HP for replacements I think. And it gave a Code Purple, and if I'm not mistaken that's because his windows was tattoed to his old mobo. So how can I use his HDD on my mobo?

 

Thnak you.

You can try formatting it. Put in your Windows disc and just format it. If you don't know how, or what I'm talking about, you should really look it up.