Well, first off, this forum isn't here for advice on how to rip off software...so try not to go on that route here.
But anyway, the software itself doesn't really check. It's in the registration that things are checked. If you load on one machine, and register it, MS retains a record of the registration, the number of seats your copy allows, and a code on your system specs. If you reinstall and have to activate again, MS will see your previous registration do a comparison, and then depending on the license and activity accept or deny the registration.
Usually a off-shelf copy of Windows allows for only two PCs to be running Windows at once. After that, the registration will fail.
And to my knowledge, you can't upgrade 98 to XP. It's too far back. I've tried upgrading NT4 to Xp and run into problems, and 98 is older.