Orbits of charged particles under the effect of a magnetic field are mathematically described by magnetic geodesics. They appear as solutions to a system of (nonlinear) ordinary differential equations of second order. But we are only interested in periodic solutions. To this end, we study the corresponding system of (nonlinear) parabolic equations for closed magnetic geodesics and, as a main result, eventually prove the existence of long time solutions. As generalization one can consider a system of elliptic nonlinear partial differential equations whose solutions describe the orbits of closed p-branes under the effect of a "generalized physical force". For the corresponding evolution equation, which is a system of parabolic nonlinear PDEs associated to the elliptic PDE, we can establish existence of short time solutions.