Of course, the technique depends on what you're using the caramel for, so care should be taken to note in your recipe what kind of caramel is called for. For example, the caramel needed for caramel candies is much less cooked than what's needed for spun sugar.
Here is the basic technique we use when caramelizing sugar:
2 cups sugar
1/2 cup water plus more for brushing sides of pan
1/4 tsp. cream of tartar or lemon juice, optional
Use a heavy, high-sided pan so that the sugar liquefies without burning. Cast iron pans skillets work well for caramelizing.
Combine sugar and water in the pan, stirring with a wooden spoon, until it forms a slurry with the consistency of wet sand. Heat over medium heat and bring to a boil. Do not stir. After a few minutes, you may add some lemon juice or cream of tartar (dissolved in a bit of water) to help prevent re-crystallization.
As the sugar is melting, you can brush down the sides of the pan with a pastry brush to prevent crystallization (it will reincorporate and melt any dried bits of sugar that could turn into crystals.)
Now that the caramel is heating up, its color will start moving through all the shades of amber. Remove the pan from the heat once the desired color is about to be reached, since the caramel will continue to cook after removing it from the heat. (This can take from 5 to 15 or more minutes.) If you need to stop the cooking process abruptly, remove from heat and carefully immerse the bottom of the pan into a bowl of cool water.