It's a writ, usually filed by a trial counsel, asking the court
to dismiss a charge or complaint against a person due to factors
named in the writ. Like the lack of evidence, or failure of the
complainant to appear as an example.
A Motion for Dismissal is drawn up after a Complaint is received when the Defendant has reason to believe the Complaint is invalid.
There are certain reasons that courts will accept such as the wrong venue; the Complaint is against someone who is not a party to it; if the Complaint was not served properly.
It is usually best not to ask for a dismissal if the cause is not one of the above because it shows your hand. The other side can just do a revised complaint and you're right back where you started. You could better just do an Answer to the Complaint and have one of your answers reflect the reason you think the case is not valid.