Some alcohol cooks off when used this way, but not all. Be cautious when cooking for others to mention this so non-drinkers can make an informed choice.
It can be a delicious addition though: alcohol dissolves flavor and aromatic compounds that water and fat cannot, so you get a lot of unique flavors especially from barrel-aged drinks like whisky and wine.