Lagrangian mechanics is a formulation of Classical Mechanics that is complementary to, and more general than, the more familiar Newtonian Mechanics. Not only that, it is taken as the basis of Quantum Field Theory, which describes the most fundamental interactions in nature. It is therefore a very important part of the physics cannon, although one not widely appreciated outside of the field.

The power of Lagrangian mechanics for classical physics is two-fold. The equations for a particular body or system can describe the evolution of that system in terms of the coordinates of one's choosing, and if aspects of the evolution are already known, the equations can determine the forces responsible for that evolution.

Lagrangian Mechanics follows from Hamilton's Principle, also known as the principle of least action, which says that a system will evolve in such a way as to minimize the time integral of the Kinetic Energy minus the Potential Energy, or, in symbols:
δ ∫ T - U dt = 0
where the integral runs from an initial time to a later time, and δ ( something ) = 0 just says that ( something ) should be minimized.

The quantity T - U is called the Lagrangian, given the symbol L, and is named for Joseph Lagrange (1736 - 1813), a French physicist who developed much of this theory. So we have
L = T - U
δ ∫ L dt = 0.

In general T and U are functions of position, velocity, and time. However, the position and velocity need not be expressed in standard length and time coordinates, but may be much more general Generalized Coordinates, which are analagous to standard coordinates in that they specify the state of a system and change as the system evolves, and the cooresponding generalized velocities.1 Thus the Lagrangian will in general be a function of the generalized coordinates, the generalized velocities, and the time, or in symbols
L = L(qj,q'j,t)
where the qs are the generalized coordinates and the q's are the generalized velocities, with a prime (') designating a derivative with respect to time.

A purely mathematical result from the calculus of variations tells us that if the time integral of a function is to be minimized, where the function is a function of several sets of variables, each set of two related by the fact that one is the time derivative of the other, then the following condition applies:
∂f/∂yi - d/dt ∂f/∂y'i = 0
where the yis are the variables and the y'is are the variables that are their time derivatives.

Applying this condition to Hamilton's principle with the Lagrangian in it, we get:

d/dt (∂L/∂q'j) - ∂L/∂qj = 0

and this set of equations, one for each set of generalized coordinate qj and corresponding velocity q'j are the Lagrange Equations of Motion. Obviously, there are j equations.

To show how Newton's equations can result from LaGrange's equations, let's take the special case where Newtonian Mechanics applies, that is when we take the generalized coordinates to be standard cartesian coordinates. To simplify let's work in one dimension only. Then we have from the Lagrange Equation of Motion ∂L/∂x - d/dt ∂L/∂x' = 0, where x' is the standard velocity V. Now, let's restrict the situation to standard conservative forces where the potential energy U is only a function of the position x: U = U(x), and where the kinetic energy T = mv^2/2 = mx'^2/2. Then d/dt ∂L/∂x' = d/dt ∂T/∂x' = d/dt mx' = mx'' = ma. Also, for conservative forces, ∂L/∂x = -∂U/∂x = F. So we have, from the Lagrange equation F - ma = 0, or F = ma, which is the standard equation of Newtonian mechaincs.

We have seen in the case of case of Cartesian coordinates that ∂L/∂x' = mx' which is the linear momentum in the x-direction. In fact, for non-cartesian coordinates we can define a Generalized Momentum1 conjugate to each coordinate:
pj = ∂L/∂qj'
which is the analog of the linear momentum.

The Lagrange equations are more general than Newton's equations becuase they can describe the evolution of a system in terms of the generalized coordinates and generalized velocities, which you are free to pick. This often yields a better or more useful discription.

Often, systems are subject to non-conservative forces, such as friction, that are not derivable from a potential function. In that case, through derivations that don't rely on Hamilton's principle but rather on purely mechanical postualtes, it can be shown that forces derivable from a more general generalized potential, called generalized forces and represented by Qj, can be included in the Lagrange equations of motion in the following way:
∂L/∂qj - d/dt ∂L/∂q'j = Qj
where L is the standard Lagrangian used previously.

Often, the generalized coordinates chosen are not necessarily completely independent, that is there are restrictions on one in terms of another or others. These restrictions are called equations of restraint. If the equations of constraint are so called 'holonomic,' meaning that they can be expressed as simple algebraic relations among the generalized coordinates and time, it can be shown, using applicable results from the calculus of variations, that the in presence of these holonomic equations of restraint, the Lagrange equation of motion can be expressed as
∂L/∂qj - d/dt ∂L/∂q'j + Σk λk(t) ∂fk/∂qj = 0
where the fks are the equations of constraint and the λks are the corresponding Lagrange Multipliers, which can be determined by solving the equation, and which turn out to be the forces responsible for the equations of constraint. Thus LaGrange's equations can not only describe the evolution of a system, but if something about the evolution of a system is already known, i.e. the equations of consraint, then they can also tell us something about the forces responsible for evolving the system.

There is also a generalization to semi-holonomic constraints, in which the constraint equations do contain the generalized velocities. These involve more complex experssions relating the forces of constraint λk and the equations of constraint fk, but they can eventually be expressed in terms of generalized forces of constraint, which, as generalized forces, are represented by Qj
where Qj = Σαα (∂fα/∂qj - d/dt(∂fα/∂q'j)) - dλα/dt * ∂fα/∂q'j}
The equation of motion is then
∂L/∂qj - d/dt ∂L/∂q'j = Qj

Returning to the more specific case where we don't have or care about any equations of constraint, and if we consider a conservative system, like in the Newtonian case above, where the potential energy is only a function of the position and not of the velocity, U = U(x), and if we consider the special case where the generalized coordinates can be related to regular cartesian coordinates with equations that do not contain the time, in which case the generalized cordinates are said to be scleronomic, we get an important result
Σj qj ∂L/∂q'j = Σj qj ∂T/∂q'j = 2T

The results ∂L/∂q'j = ∂T/∂q'j = p'j and Σj qj ∂T/∂q'j = 2T in the special case of conservative forces and scleronomic general coordinates respectively, are important in the formulation of the Hamiltonian and the canonical equations of motion. Read about that here.

It is also possible to formulate Lagrangian Mechanics in a way that treats both time and position as parameters, rather than time as a parameter and position as a variable. This symmetric treatment of time and space is Classical Field Theory. The idea is to treat so called 'field variables' as the variables in the Lagrangian, which are themselves functions of time and space coordinates:
φi = φi (xk, t)
The Lagrangian is then the integral over time and space of a Lagrangian Density £, which is a function of the field variables at every point in space and time:
£ = £(φi )
L = ∫ £ d3x dt
Applying the standard least action principle procedure from above, we then have the Lagrange Field Equations:

d/dt(∂£/∂(dφi/dt)) + d/dxk(∂£/∂(dφi/dxk)) = ∂£/∂φi

In Quantum Field Theory, we treat particles as manifestations of fields that exist throughout space and time, and write down Lagrangians for the fundamental interactions, with those fields as the variables.

Whenever I think about Lagrangian mechanics or tackle problems with it, the strains of ZZ Top's La Grange enter my head, for obvious reasons. This is a positive side effect, as I am transported away from my desk to the dusty plains of Texas and that little shack on the edge of town.

1 Generalized coordinates are analagous to regular 'cartesian' coordinates in that they are quanities that describe a system and can change as it evolves over time. However, they need not be lengths, indeed they can be angles, volumes, or almost anything. The cooresponding generalized velocities are the time derivatives of the generalized coordinates, just as regular velocity is the time derivative of cartesian coordinates. A generalized momentum, however, is defined as the as the partial derivative of the Lagrangian with respect to the corresponding generalized coordinate, which happens to be the regular momentum in the case of a cartesian coordinate.