If you are planting bamboo, plant it only in a large container and never directly in the ground where it can spread freely. If you already have bamboo in your yard and want to get rid of it, you have a lot of work ahead of you.
Option 1: Cut, Clear, Repeat, Repeat, Repeat
This is how most people deal with bamboo. Simply cut it to the ground (probably using a machete) and enjoy the space until it starts to grow back and you have to repeat the process. Bamboo grows very quickly from roots that spread easily through even the rockiest soil, so it won't be long before you have to clear it again and you may find it in new areas. This method is much less work during each individual clearing effort, but you will constantly have to deal with new sprouts.
Option 2: Cut, Dig, Fortify, Done
To permanently remove bamboo, you must dig ALL of it out by the root. The only other option is to pour a STRONG pesticide onto the cut stalk, and I hate the idea of bringing anything like that into my garden. First, cut all stems to the ground. Second, dig up all of the roots. If it is especially dense you will need to use a pickaxe to break up the huge chunks before finishing with a shovel. Follow every single root to its tip and make sure it all gets pulled out. Do not leave any dug up roots in the area even in pieces or they will reestablish themselves; take all pieces off site if possible. If you are able to clear the entire stand and remove all roots, then you should be done. Dig through the soil, especially around the edges, to make sure nothing is left over and enjoy your new yard space.
If your bamboo is like ours and crosses into your neighbor's yard where you cannot remove it, you will need to fortify your space so it does not spread back and reinfest. Because bamboo spreads by the root, this fortification must be done underground. Dig a trench along the edge of the cleared area at least 1 foot deep. Build an underground wall out of impermeable materials-- we used cinderblocks in one area and square brick paving stones in another and both have been successful.