Malicious prosecution is extremely difficult to prove and is disfavored by the law. It requires the plaintiff to plead and prove four distinct elements in order to prevail. These elements are: (1) initiation of a prior proceeding; (2) favorable termination; (3) lack of probable cause; and (4) malice.
The first element is pretty self-explanatory: it requires the initiation of some formal proceeding, e.g. filing of a complaint. The second element is a bit more nuanced, but an example of a favorable termination would be a defense jury verdict or dismissal with prejudice of the underlying claims.
The existence of probable cause is determined by an objective test: “a suspicion founded upon circumstances warranting a reasonable man’s belief that grounds exist for initiating proceedings.”
If an attorney is being sued for malicious prosecution, the test for probable cause is whether, as an objective matter, “any reasonable attorney would have thought the claim tenable.” That is, the “ . . . standard  is satisfied if the issues presented in the underlying action were arguably correct, even if it was extremely unlikely the client would win.”
And in order to show malice, plaintiff must plead and prove either ill will or some ulterior purpose distinct from that of enforcement of the alleged cause of action.
Those are the elements of a malicious prosecution. But beware: courts do not like these kinds of claims. And they are automatically subject to anti-SLAPP treatment.