Magnetic geodesics describe the trajectory of a particle in a Riemannian manifold under the influence of an external magnetic field. In this article, we use the heat flow method to derive existence results for such curves. We first establish subconvergence of this flow to a magnetic geodesic under certain boundedness assumptions. It is then shown that these conditions are satisfied provided that either the magnetic field admits a global potential or the initial curve is sufficiently small. Finally, we discuss different examples which illustrate our results.