First of all, just because there’s a power outage at your house, doesn’t mean there’s one everywhere. Often times, a blown transformer can take out your house’s power, but leave on your neighbors nearby.
Second, the phone lines are a physically separate structure from the electricity service running to your power outlets. So neither is directly dependent on the other at your house.
Third, even if the primary plant and transmission lines that bring electricity to your house are completely offline, the phone company has access to more robust backups and can continue to provide the power for their phone lines.
Fourth, cell phones run on batteries and cell towers are on a different power grid than your home. Plus they have their own local power redundancy as described for the phone company in general.
Finally, as an aside, your cable television service will usually continue provide signal through your coax line during a localized electrical power outage, assuming you have a battery-powered television with which to watch it.