Use a metal frying pan that can be baked in the oven. Preheat the oven to 175°C/350°F/gas 4.
Peel the apples and remove the cores. Cut the apples in half if they are small, or into thicker pieces for larger apples.
Heat the sugar in the frying pan until all the sugar has melted and caramelized slightly, being careful not to let it burn. Remove from the hob and carefully add the margarine, salt and the pieces of apple and let it cook for 10–15 minutes. Remove from the heat. Cover with the puff pastry and fold the edges in towards the apples in the frying pan.
Cut a small cross or make a few holes in the puff pastry with a fork or skewer. Bake for 25–30 minutes until the puff pastry has risen and looks well baked. Bring the tarte out of the oven and carefully invert it onto a plate.