You can use the upgrade if you already own a qualifying copy of Windows. The upgrade would normally assume that you had an OS installed on the computer and you were upgrading it to Win7, but also Win7 would only actually upgrade Vista and not XP so even if you had XP and bought the Win7 upgrade, you had to do a clean install of Win7. With Vista you could upgrade or do a clean install. At some point in the installation it probably asks you to put in the disk from your older version of Windows so it knows you do have it, then it continues with the clean install.
I have read that there are ways to do a clean install of Win7 without having to dig out your older Windows disk, but you're on your own to search the net for that. If you buy an upgrade version of Windows and don't own a legitimate copy of Windows to upgrade, then you are violating the user license.