To analyze a mechanical system we construct an action function that gives us a way to distinguish realizable motions from other conceivable motions of the system. The action function is constructed so as to be stationary only on paths describing realizable motions, with respect to variations of the path. This is called the principle of stationary action. The principle of stationary action is a coordinate-independent specification of the realizable paths. For systems with or without constraints we may choose any system of coordinates that uniquely determines the configuration of the system.
For a large variety of mechanical systems actions are integrals of a function, called the Lagrangian, along the path. For many systems an appropriate Lagrangian is the difference of the kinetic energy and the potential energy of the system. The choice of a Lagrangian for a system is not unique.
For any system for which we have a Lagrangian action we can formulate a system of ordinary differential equations, the Lagrange equations, that is satisfied by any realizable path. The method of deriving the Lagrange equations from the Lagrangian is independent of the coordinate system used to formulate the Lagrangian. One freedom we have in formulation is that the addition of a total time derivative to a Lagrangian for a system yields another Lagrangian that has the same Lagrange equations.
The Lagrange equations are a set of ordinary differential equations: there is a finite state that summarizes the history of the system and is sufficient to determine the future. There is an effective procedure for evolving the motion of the system from a state at an instant. For many systems the state is determined by the coordinates and the rate of change of the coordinates at an instant.
If there are continuous symmetries in a physical system there are conserved quantities associated with them. If the system can be formulated in such a way that the symmetries are manifest in missing coordinates in the Lagrangian, then there are conserved momenta conjugate to those coordinates. If the Lagrangian is independent of time then there is a conserved energy.