iPhone Jailbreaking and Unlocking What exactly does jailbreaking and unlocking doing to an iPhone? 

I'm aware that hackers are using baseband crashes for unlocking, but how are they exploiting these crashes? Even if they inject their code into memory, how they are keeping it even after a reboot? 

How these guys finding the crashes? Can I find the crash log too? 

As an iPhone developer, I'm interested in some technical answers.

I've gone through some interesting links from here, but haven't found anything about how the hackers are doing it (especially unlocking).

Any references will be extremely useful.
Jailbreaking is the process of hacking the code signing mechanism to allow unsigned code to run on the phone. There are multiple tools used for this and they vary between both model and iOS version.

Unlocking is the process of hacking the 3G chip's baseband to allow SIM cards from other networks without an official unlock from the carrier. There's also an alternative method called Subscriber Artificial Module (SAM) which creates a fake but slightly more authentic unlock from iTunes. I have never needed a hacked unlock (Australia has official carrier unlocks) so I don't know much more about it. Unlocking naturally needs a jailbreak to work, which is why the two are sometimes confused.

If you want a more technical answer you'll need to specify one or the other, as jailbreaking and unlocking are two entirely different types of hacks.

I'd also advise against trying anything you don't completely understand because if you don't know what you're doing you're liable to make irreversible changes to your phone, especially when tampering with the baseband.