The whole process should take only a few days, but check with the local authorities. If you are from a non-EU country, thinks are more complicated. You first need to find an employer that is interested in hiring you and can prove that you are more qualified for the position than any German citizens. The prospective employer needs to fill in several forms for you. If you want to change employers, you need to obtain a new work permit.
Some large companies take care of all the formalities for their employees.
If you marry a German citizen you will get unrestricted, permanent work and residence permits. A foreign employee qualifies for unemployment benefits the moment he starts paying the obligatory unemployment insurance through his employer. I believe an employee has to have worked for at least six months to draw money. If the unemployed foreigner cannot get another job, the authorities will extend his residency permit until he has collected all the money coming to him under unemployment. The payments depend on the employee's salary on termination, length of service and his age.