Alcohol not only evaporates without heat, but the majority also burns off during the cooking process. How much remains in the dish depends on the cooking method and amount of cooking time.
Those bourbon-soaked fruitcakes would have to turn into bricks before the alcohol evaporates. A bottle of Guinness in a long-simmered stew is not going to leave a significantly measurable alcohol residue, but will add a rich, robust flavor.
A quick flambé may not burn off all the alcohol, whereas a wine reduction sauce will leave little if any alcohol content.
Heat and time are the keys. Obviously, uncooked foods with alcohol will retain the most alcohol.
Take a liquor that is 100-proof. This means it is 50 percent alcohol by volume. So a baked and/or simmered dish with 2 ounces (1/4 cup) of 100-proof liquor cooked for 1 hour will have 12.5 percent alcohol content remaining, about 1/4 ounce. Divide that by the amount of servings, and the quantity goes down proportionately.
The same dish with 10-proof wine, or 5 percent alcohol by content, would end up with less than 2 percent alcohol content remaining after baking or simmering for 1 hour.
Longer cooking and/or higher heat gets rid of even more alcohol. If you're worried about legalities, long cooking should do the trick. Always inform your guests when you are cooking with alcohol.
Here is an Alcohol burn off chart I found by the U.S. Dept. of Agriculture.