How long do you have to wear retainers for after braces?

Long-term. "retention is a life-time commitment to periodic wear of retention devices." age changes us - that includes your teeth. Only way to prevent change is regular periodic monitoring and retention.
Usually a month. If you need to go past that for holding position of the teeth, then you need a functional othopedic applliance.