How long can a lawsuit last in court?

Depends on the kind of lawsuit and whether or not appeals are involved. Some can last a decade or more from filing to final appeal. And then, if the appeal court "remands" that means it is sent back down for potentially rehearing, which means a new trial and things can start up all over again.