Phase transitions in compact stars