In 1521 Ferdinand Magellan arrived on his round the world expedition and, although he was killed in the Philippines, he claimed the islands for Spain. This led to colonization of the islands, which was a relatively simple feat considering each island was isolated from the next so there was no unifying force of resistance. It was during this time that the islands became known as the "Spanish East Indies" or "Filipinas," after King Philip II of Spain and hence the name "Philippines" was born.
The Spanish introduced Catholicism and education among other changes. Both were well received by the locals and today the country remains primarily Catholic. From the Spanish perspective, though the islands were not profitable. Perhaps only because the islands were needed as a stronghold in Spain's wars with the Dutch and British did they maintain control over the Philippines.
Throughout the 1700s and 1800s the Spanish continued their emphasis on education, religion, infrastructure, and communication on the islands. Although many view Spanish rule as mostly positive, in the late 1800s independence movements were arising.
The Spanish-American War ended in 1898 with Spanish defeat and the United States' takeover of the islands. The Filipinos fought this, but the US was too powerful and wanted to maintain control over the islands. After a brief war and much debate, the US decided to grant the Philippines independence over a long transition period, ending with complete freedom in 1946. Unlike the Spanish, the Americans' focus was on economic development and they made the Philippines are bigger player in the Far East's economic markets.