How long does an ear infection take to cure?

Not that long. Simple war infections like external ear canal infections can clear with appropriate treatment in a few days. Chronic middle war infections may take longer time, they may need surgery.
On average. Depends on inciting agent or organisms. Average 10-21 days.