How do I install linux and get rid of windows xp?

I just got a computer from a friend that had a corrupted version of windows xp. I tried uninstalling it through the command prompts but it says it wont work. I tried installing linux but after the boot screen it comes up with all these error messages. Im not planning on partitioning my hard drives. Does anyone know if you have to uninstall windows to make linux work right?