In this article, we have studied the dynamics of a particle having charge in the presence of a magnetic field. The motion of the particle is confined in the x-y plane under a two dimensional nonlinear potential. We have shown that constant magnetic field induced dynamical chaos is possible even for a force which is derived from a simple potential. For a given strength of the magnetic field, initial position, and velocity of the particle, the dynamics may be regular, but it may become chaotic when the field is time dependent. Chaotic dynamics is very often if the field is time dependent. Origin of chaos has been explored using the Hamiltonian function of the dynamics in terms of action and angle variables. Applicability of the present study has been discussed with a few examples.