To prevent cupcakes from sticking to the liners, lightly grease the liners or use non-stick liners. You can also let the cupcakes cool completely before removing them from the pan to minimize sticking.