Individually sold copies of Windows contain the activation key in the packaging. Computers preloaded with Windows 7 or an earlier version have the number printed somewhere on the device. If the key can't be found, software such as ProduKey locates the activation key on a functioning computer.
At the release of Windows 8, manufacturers were no longer required to print the number and so did not. Users of Windows 8 who do not have their activation key and whose copy of Windows has been removed or destroyed may return their device to the manufacturer and pay to have it reinstalled.