Appealing the Denial of an Application for Visa or Residence Permit

What can I do if the Ausländeramt considers to deny me a permit?

If they contact you in advance, use this chance to communicate with them! They are not obliged to discuss all questions with you – when you are applying from abroad. They will seriously listen to your arguments – but only once.
If they deny, you have the right to appeal. It must be done within one month after having received the denial, in writing, and the appeal must be in German. You have to quickly consult an attorney because you will have to file a case in court to have the denial tested there. There is no other way to appeal! N.B. Do not dream that you will get a quick solution when arguing with the case decider after a denial – be it in Germany or the German consulate abroad. This person made her or his decision and that is it. You have to go to court.
§§§§

I trust that my lawyer will get the decision at the speed of lightning. But how long does it take until the court decides?

In normal immigration matters, it will honestly take up to around a few months plus. Do not reckon when you win that immigration will bow down and instantly grant – just because the court said so. This can take some time, too. If the office needs another six months or more, you can bring it back to court...
§

Goodie. I had to to go to court. What is my status in the mean time while the court is taking its time to decide?

Your status remains that you have to leave Germany! Appealing the denial does not stop your obligation to leave. You seriously have to expect that the office will process your deportation if you do not leave on time or have filed for a temporary injunction.
§§§§

Can I try to find a job or become self-employed while waiting? What happens when I do find a new job? May I apply for it?

Sure, you can try but it will not really help because no permit may be granted while you have the duty to leave! In other words, after having left Schengen Territory, you can reapply under normal conditions. The more you only use your rights and keep given deadlines, the less problems can come up in the future.
§§