The easiest way to claim land and protect it is to use grief prevention
(golden shovel). See the wiki entry for more information.
You may claim land without protecting it with grief prevention. The rest of the information here details that procedure.
land claims must be clearly marked with a border defining the outline of your land. The border must be two blocks high or a one block high fence to prevent people from entering the claim, except through designated entryways (doors/doorways/etc). Each side of the border must be marked by signs at least every 100 blocks.
land claim is one on which it is obvious the land is in use for a project. For example, if I built the first two blocks in height of my new castle's floorplan, it would be obvious that the land within the castle is in use for a project, and I could thus take down my land claim fence.
Towns may create their own rules for land claims, to prevent the town from becoming ugly due to walls on unbuilt claims. For example, a town may mark out plots, and create a rule for claiming that only a sign is needed to claim a plot. These rules must be clearly displayed within the town, and players must abide by them.
For example, say I want to build on this plot of land next week:
Today, I would build a simple cobblestone border wall, 2 blocks high, around the perimeter that I wish to build in:
Next week, I start to build it out:
Now I can remove whatever land claim wall remains while I finish up the build: