First, make sure the baking tin is greased thoroughly. Then, let it cool a bit before taking the cake out. This will prevent sticking.