With the invention of software copyright also invented technical mechanisms to enforce the copyright and software licensing restrictions.
Floppy disk copy protection
One kind of copy protection was very common on microcomputers when software was distributed on floppy disks. It take advantages of specific characteristic of the floppy disk mechanism. One common trick was punching holes in floppy disks and having the software look for read errors in that area. On the Apple II, one common trick was to change the address marks, bit slip marks, data marks, or end of data marks from Apple's standard, so software designed to copy standard disks could not copy these copy-protected disks. Apple II software that was devised to defeat this kind of copy protection included Locksmith and Back It Up, and there was a cat and mouse chase between the two.
Copy protection based on offline material
Another kind of copy protection was in the forms of software asking the users questions from offline material shipped with the game, such as a manual. Sierra's King's Quest III for example require lengthy passages to be copied from the manual.
Dongle-based copy protection
Another kind of copy protection is to require a hardware dongle to run the software, tying the software to a scarce physical object usually supplied with the software. Designs ranges from simple to complex, depends on how much protection is required. Common ports for attaching dongles include parallel port, ADB, and USB.
CD copy protection
Back in the old days of CD-ROMs, CDs could not be easily copied. This changed with the advent of CD-RW drives. The game industry responded with copy-protection schemes like StarForce and SecuROM. Many of these schemes had compatibility issues, not to mention they were often cracked.
Online activation is getting more common in software. Microsoft's Windows XP and Office XP and later does it, as well as some other vendors like Adobe. Some problems are dependence on a central server. Should it become decommissioned, the software vendor may need to offer an patch to disable activation.