This is the process by which full execute and write access is obtained on all the partitions of the iPhone. It is done by patching /private/etc/fstab to mount the System partition as read-write. This is entirely different from an unlock. Jailbreaking is the first action that must be taken before things like unofficial activation (hacktivation), and unofficial unlocking can be applied.
The original jailbreak also included modifying the AFC service (used by iTunes to access the filesystem) to give full filesystem access from root. This was later updated to create a new service (AFC2) that allows access to the full filesystem.
Modern jailbreaks also include patching the kernel to get around code signing and other restrictions. See Kernel Patches.
NOTE: The legality of jailbreaking your device varies with each country/region. Wikipedia has a summary of legality for some countries.
Version numbers are the first to jailbreak and last is the last supported version. Last will only be listed if a newer version is out that does not support the device and iOS.
|iPhone 2G||iPod touch 1G|
|Apple TV 2G||iPad 2||iPad 3||iPad 4||iPad mini 1G||iPhone 3GS||iPhone 4 (iPhone3,1)||iPhone 4 (iPhone3,2)||iPhone 4 (iPhone3,3)||iPhone 4S||iPhone 5||iPod touch 4G||iPod touch 5G|
|iPad 2||iPad 3||iPad 4||iPad Air||iPad mini 1G||iPad mini 2G||iPhone 4 (iPhone3,1)||iPhone 4 (iPhone3,2)||iPhone 4 (iPhone3,3)||iPhone 4S||iPhone 5||iPhone 5c||iPhone 5s||iPod touch 5G|
|iPhone 4 (iPhone3,1)||iPhone 4 (iPhone3,2)||iPhone 4 (iPhone3,3)|
|iPad 2||iPad 3||iPad 4||iPad mini 1G||iPhone 3GS||iPhone 4 (iPhone3,1)||iPhone 4 (iPhone3,2)||iPhone 4 (iPhone3,3)||iPhone 4S||iPhone 5||iPod touch 4G||iPod touch 5G|
|6.1.6||N/A||Cydia package only1||N/A||Cydia package only1||N/A|
1 Use redsn0w to tethered jailbreak and then upgrade to untethered by downloading the p0sixspwn package from Cydia.