Legal action taken against someone, is called what?

lawsuit or litigation.

Define litigation in one sentence

Litigation is the process of taking legal action through the court system to resolve a dispute or enforce a right.