how was it named?
It was named after Philip II of Spain.
Philippines
Spanish explorer Ruy López de Villalobos, during his expedition in 1542, named the islands of Leyte and Samar "'" after Philip II of Spain, then the Prince of Asturias. 
where is the philippines located on the world map In the  western Pacific Ocean.
wiki:25617162
Philippines [SEP] Etymology
Spanish explorer Ruy López de Villalobos, during his expedition in 1542, named the islands of Leyte and Samar "'" after Philip II of Spain, then the Prince of Asturias. Eventually the name "'" would be used to cover the archipelago's Spanish possessions. Before Spanish rule was established, other names such as ' (Islands of the West) and Magellan's name for the islands, ', were also used by the Spanish to refer to islands in the region. During the Philippine Revolution, the Malolos Congress proclaimed the establishment of the " or the "Philippine Republic". From the period of the Spanish–American War (1898) and the Philippine–American War (1899–1902) until the Commonwealth period (1935–1946), American colonial authorities referred to the country as the "Philippine Islands", a translation of the Spanish name.