Jailbreaking is the term used to describe the process of gaining access to the phone's operating system. The real beauty of the iPhone is that it is really a cut-down Mac computer inside, and so it's capable of being modified, extended and personalised in a way other mobiles can't.
Naturally Apple on a corporate level would prefer people didn't modify phone software as they're worried about product liability so they 'lock' the phone up. Fortunately Apple left a couple of bugs in the system that allow us to gain what's called 'root' access - basically have access to the system and the ability to do anything when in there.
The current bug that is being used has been fixed now in the latest phones but it is still possible to do by downgrading the operating system if you have a new phone. It's a bit of a faff but it's widely done.