After you've baked the cake, you take the cake out of the tin and put it aside. Clean the tin and then pour the jelly in the tin. Put the tin with the jelly in the freezer (just make sure you've got a tin where you can remove the bottom). Remove tin from freezer (once jelly is frozen solid) and remove the jelly from the tin. Now assemble the cake! You can do that in the tin if you want, but it's not necessary.

Basically, cut the cake in two layers, and put frozen jelly in the middle! That way the jelly won't fall apart!
HTH