You need a separate copy of Windows for each computer it's running on. Networks don't make any difference.
If you're buying it from someone like HP, it will probably come with Windows.
You may be able to transfer your copy of Windows from your old PC, but only if it's a retail version, not an OEM version. You'd have to stop using Windows on the old PC.