There are several different explanations given on the show, and there may be different types of Time Locks too.
1. There were time-locked/quantum-locked things such as the weeping angles and the shield bubble around Torchwood Three. They seem to just be very solid things. They haven't been explained much and are probably irrelevant.
2. When Weeping Angels sent people into the past, those events were often Time-Locked. This is part of the reason why the Doctor can't retrieve Amy and Rory in "The Angels Take Manhattan".
3. The Master and the Doctor once put Time Locks on each other's TARDISes. The Locks prevented either TARDIS from moving.
4. There's the Time Lock on the Time War. Presumably, this is to keep future Time Lords and Daleks from going back in time to the events of the war and modifying them in their favor (among other reasons). No one can time-travel into or away from the events of the war. This is why there were no "survivors" of the Time War except for the Doctor and a handful of Daleks. Dalek Caan managed to break through and rescue Davros, but he lost his mind doing so in "Evolution of the Daleks"/"The Stolen Earth".
5. We know there are other Time Lords in the galaxy from before the Time War, but the Doctor never meets them. He never tries to go to pre-war Gallifrey. There may always be some form of time lock on Gallifrey and on Time Lords.
6. On the same lines, people can't cross their own time streams. That's why the Doctor had someone else deliver his letters in "The Wedding of River Song".