Maternity leave.

This is my first pregnancy so I'm alittle confused about how everything works. When do I ask to go on disability? Or does the doctor have to tell me ?