You applied for an extension, a settlement permit or a visa and have heard nothing for months? No appointment, no answer? An action for failure to act can force the authority to decide.
Under § 75 VwGO you can sue if the authority has not decided within a reasonable time without sufficient reason, in principle at the earliest three months after your application. If there is a sufficient reason, the court suspends the case and sets the authority a deadline. Courts often do not accept a long-known overload of the authority or a lack of appointments as a sufficient reason.
If you applied for the extension before your permit expired, your previous permit is deemed to continue until the decision (§ 81(4) AufenthG). The authority issues a fictional certificate (Fiktionsbescheinigung). As a rule, you may continue to work as before.
If you risk losing your job or must urgently travel, an additional urgent application under § 123 VwGO may be necessary, for example to obtain the fictional certificate.
If the authority only decides after the lawsuit although you could expect a decision earlier, it usually bears the costs (§ 161(3) VwGO).