Any person or organization on the defensive side of a civil lawsuit is likely wondering what their options are to dismiss the matter. If you visit a civil defense law firm, there's a good chance they'll explore at least one of the following four choices.
A civil defense attorney might question whether the complainant has any standing to bring the suit. While Americans have a reputation for mindlessly suing everybody, the law isn't a fan of such cases. The law requires a plaintiff to have reasonable standing to sue. This means they have a legal right and basis for pursuing action.
If a plaintiff sues on behalf of another person, for example, they have to prove they have the standing to pursue action for them as a guardian or some other legally-recognized figure. Whenever someone fails to prove standing, the other side has the right to file a motion to dismiss the case. Ideally, the judge will dismiss the case with prejudice, meaning the plaintiff can't bring the complaint again.
Another argument for halting a lawsuit is that the issue isn't ripe. Suppose someone asks a civil court for an injunction to stop a construction project before it has even reached the public discussion phase. The defendant might tell the court that the case isn't ripe for review because the normal legal process hasn't reached the point where an injunction is necessary. Judges usually only grant injunctions to stop current or impending harms so the court might dismiss the case.
If granted, the dismissal would probably be without prejudice because a lack of ripeness implies a case might yet become ripe for review. For example, the construction company might obtain permits and prepare to break ground. At that point, the plaintiff would almost certainly come back to the court and argue the matter is ripe.
When a civil case goes before a court, it has to be at a place where the judge rightly has jurisdiction. If a case appears to be a federal matter, for example, a civil defense attorney might argue that a plaintiff can't bring it to a state court.
Finally, a case has to have a relevant legal basis. If someone sues you under environmental law for what is fundamentally a code violation, for example, you have the right to ask the court to dismiss the suit. It doesn't always prevent the party from bringing another suit later, but it may at least make them reconsider.