I don't have detailed insights into the specifics, but I can offer up some rough general information...
There are basically two ways to lock a zone - via Domination, or via Victory Points.
Domination Lock...
Is achieved by holding onto control of the zone for a certain amount of time. Each keep and objective has a time counter once it is captured (2hrs for Keeps, and 30mins for Battle Objectives I think). If all the Keeps and BO's are held long enough for all their timers to reach zero, the zone locks. I believe Keeps must be claimed by a guild for a Domination Lock to work, and if the guild loses their claim (either removes it or runs out of funds to maintain it), the timer will be reset, and then reset again when another guild claims the Keep.
(you will often see Foghlada/Dannian rush to a zone, grab and claim both the keeps and exit to another zone without touching the BO's - this is often in preparation for a later Domination Lock. Since Keeps take so long to count down, he can keep destro busy in another zone for the next hour and a half, then return to take and defend all the BO's for the last 30mins it takes for all the counters to reach zero)
Victory Point Lock...
This one I don't know the specifics, but in general, the idea is to gain 65 victory points (measured very vaguely by the Blue/Red bar in the top right of your screen). Scenarios contribute to this score. Objectives contribute to this score when they are locked, and again when their counters reach zero. Keeps contribute to this score when they are captured, when they are claimed by a Guild, when they are successfully defended, and when their counters reach zero. Skirmish (players killed by other players out in the RvR lake) also contribute to this score. There is also a natural decay to the points earned after a certain amount of time.
Underdog Bonus...
I don't remember the secifics here, but basically, each time one side reaches the city, the other side gets a number of advantages once the City Siege is done (30mins I think, after the zones reset). These are represented by little green and red dots on either side of the Victory Points Bar in the top right. These advanages stack if one side reaches the city multiple times consecutively, and reset to normal when the other side makes it to the city. Advantages/Penalties include timers on Keeps and BO's, and the the Victory Points needed for a Victory Point Lock.
Hopefully someone else with more indepth knowledge/memory will be able to fill in the specifics on the many gaps I left.
Most defensive strategies for preventing an enemy lock involve stealing BO's out from under the enemy's nose. It's not an easy task, and can actually hurt your cause more than help it if the enemy are able to retake it before it is locked down (again, you will often see Foghlada/Dannain deliberately asking people to let Destro capture a BO, specifically for the purpose of being able to rush in and retaking it before the 3 mins are up). Ideally when stealing a BO from the enemy (who presumably heavily outnumber you if you are on the defense), you want to find a way to lure the enemy as far away from the BO you want as possible, so they have as little time as possible to respond when you take it from them.
Another option is to ninja a Keep. Most players don't pay much attention to Keeps, as they take a long time to penetrate, which means they have plenty of time to respond if it is hit. A small group of no more than 3 people (I think), can quietly set up a ram and wear down the door without flagging the Keep as being under attack. Melee classes can potentialy even set up a Ram on the inner gate if the keep isn't specifically upgraded to prevent them gaining entry (Padlock, I think). Once the Gates are worn down to 5-10%, your forces can hit the keep and drop the doors in seconds, hopefully taking the Keep before Destro can respond. Just be sure not to kill any Guards if the Keep is Guild claimed, as it alerts members of that Guild to the guards death and exactly how many players are attacking the Keep - Unless of course you want to use this to pull the enemy away from a BO you want ;).
Just a few thoughts, and barely the tip of the iceberg.