What causes postpartum depression?

I don't know much about it.. Does it happen right after the baby is born or much later? Tell me all you can!