Hundreds of thousands fled their homes as one of the year's strongest typhoons ripped through the Philippines.