I installed windows xp in our old computer(its capable of running windows 8 the memory broke.now that i got a new memory, i want to install windows 8 but i want to remove xp, how?
You don't need to uninstall W XP, well you can't actually.
What's going to happen is when you go to install W8, make sure you format the HDD or SSD where XP is. That will remove W XP and install W8 on a clean drive.
During install you have the choice to format the entire hard disk, or just a certain partition, so it's your choice. Sounds like you want to wipe everything and start fresh, so choose to format the drive prior to installation.