There is no direct upgrade. You would have to do a clean install of Win10, and pay for a licence.
Now what you COULD do is download the Win10 setup from Microsoft (it's free to download). Run the installation and skip the part where you enter your Windows key. Windows will carry on and install in "demo" mode. Now you can make sure everything is working etc. If you are happy, then you can buy a Windows Licence online, and activate your copy. Plan is you "try before you buy", rather than buying Win10, and finding your PC can't run it.
If this doesn't work properly, well you can wipe the disk and start again. All you have wasted is some time.
BUT. I wouldn't do this. Reason is the Win10 licence is worth more than your old Vista machine, and chances are it wont run very well. The minimum specs for Win10 aren't really that high, and it can run on relatively low spec hardware. I have it running OK on an old Core2 2.2 ghz laptop. But it does have 6 gb of Ram and a dedicated GPU, which both help. But I don't know the specs of your machine. 2gb is the Minimum for Win10, you really need more for it to run well.
My advice for your old PC?
Download and install Linux on it. Either Mint or Lubuntu depending on the machine specs. Mint if you have 2gb+ of RAM, Lubuntu if you have less. This gives you a modern and supported operating system, that's more secure than Windows, and runs fine on that older hardware. Best of all it's free. As you have to learn a new OS anyway, it's no harder to learn how to use one of the modern Linux distros than the new versions of Windows. Hint, if you get stuck, Google is your friend, and you can find simple instructions for getting around most problems online.