In general, for Newtonian mechanics, you start with a force function, typically expressed as a function of position. e.g. a simple harmonic oscillator gives a linear force function. The equations of motion come from using Newton's second law, F=ma.
For Lagrangian mechanics you need a Lagrangian function which is typically a function of position and velocity. If you have a force as a function of position, you would want to construct the potential function which gives the Force when one takes the gradient. (hard to write this out without equations...) This potential function is V(x). One can then use for the Lagrangian L=T-V where T is (1/2)mv^2, with v the velocity. Given the Lagrangian, you find the equations of motion by d/dt(dL/dv)=dL/dx.
The final equations of motion should be the same for Newtonian dynamics and Lagrangian mechanics should be the same, although Lagrangian mechanics allows constraints to be expressed more naturally.
Also, you may have a look at the Stack Exchange Physics site. Here is a relevant question about the distinction between Newtonian and Lagrangian with some answers: