Well, for most such problems, the Lagrangian can just be written as KE - PE where KE is the kinetic energy, and PE is the potential energy. The form of the kinetic energy changes, depending on whether you are using cartesian coordinates, or not. The potential energy for such problems usually involves two types of potential: (1) gravitational (or electrical, which is similar), (2) harmonic oscillator, the potential of a spring. It can be a little complicated to figure out the kinetic energy and potential energy for extended objects (such as rods and blocks and ropes and so forth).
Another wrinkle is that often such problems involve constraints. That is, some object is constrained to move in a circle (on tracks), or something like that. Problems with constraints are typically not solved by trying to figure out the forces or the potentials, but instead are solved using the method of Lagrange multipliers. The general idea is this: Suppose you have a problem involving coordinates x and y and you are constrained so that x^2 + y^2 = R^2 (so the motion is confined to a circle). Then one approach is this: If x and y are constrained so that F(x,y) = a constant, then let L_0 be the lagrangian that you would have without the constraint. Then you create a new Lagrangian: L = L_0 - \lambda F(x,y) where \lambda is some unspecified constant. So this is like a new potential energy term to the Lagrangian, although the magnitude is unknown. If you solve the Lagrangian equations of motion using this potential energy term, you'll get equations of motion that might involve \lambda. But then afterwards, \lambda can be eliminated by imposing the constraint that F(x,y) = whatever.