Several points:
- Assuming you're running Windows XP, you can not upgrade to 10. You would have to do a clean installation.
- A computer running XP is very old, and there's a good chance that such an old computer isn't compatible with Windows 10.
- Even if it's compatible, there's a good chance you will need Windows 10 drivers for it that aren't available.
- Even if none of the above is a problem, Windows 10 performance on such an old computer will likely be terrible.
- Given points 2, 3, and 4, you would probably need to have the hardware upgraded before you could install Windows 10. In all probability, it would be cheaper to buy a new computer than to buy a copy of Windows and have your hardware upgraded.
So don't do it. Either stay with XP or buy a new Windows 10 computer.