Levenberg–Marquardt basically replaces line search (in Gauss Newton) with a trust region strategy, (in general) convergence properties are about the same of Gauss Newton but in many cases more robust (with rank deficient jacobians etc.),
if you wish to test the code there is a version with examples in numerical recipes,
my suggestion is to start with a good text discussing numerical optimization (see for example Nocedal),
this is an area where you have to decide whether to use a procedure like LM as a black box or try to understand limits and featires...