The basis for the Philippine national language is Tagalog, which had primarily been spoken only in Manila and the surrounding provinces when the Commonwealth constitution was drawn up in the 1930s. That constitution provided for a national language, but did not specifically designate it as Tagalog because of objections raised by representatives from other parts of the country where Tagalog was not spoken. It merely stated that a national language acceptable to the entire populace (and ideally incorporating elements from the diverse languages spoken throughout the islands) would be a future goal. Tagalog, of course, by virtue of being the lingua franca of those who lived in or near the government capital, was the predominant candidate.
By the time work on a new constitution began in the early 1970s, more than half the Philippine citizenry was communicating in Tagalog on a regular basis. (Forty years earlier, it was barely 25 percent.) Spurred on by President Marcos and his dream of a "New Society," nationalist academics focused their efforts on developing a national language — Pilipino, by that time understood to be Tagalog de facto. Neologisms were introduced to enrich the vocabulary and replace words that were of foreign origin. A much-remembered example is "salumpuwit" (literally, "that to support the buttocks") for "chair" to replace the widely adopted, Spanish-derived "silya." Such efforts to nativize the Philippine national language were for naught, however, since words of English and Spanish origin had become an integral part of the language used in the everday and intellectual discourse of Filipinos.
This reality was finally reflected in the constitution composed during the Aquino presidency in the latter half of the 1980s. The national language was labeled Filipino to acknowledge and embrace the existence of and preference for many English- and Spanish-derived words. "Western" letters such as f, j, c, x and z — sounds of which were not indigenous to the islands before the arrival of the Spaniards and the Americans — were included in the official Filipino alphabet.
The aforementioned evolution of the Philippine national language is taught as part of the school curriculum in the Philippines, such that when you ask a Filipino what the national language of the country is, the response is "Filipino." In the same way that there are English (composition, literature...) classes in American elementary, secondary and tertiary schools to teach the national language of the United States, there are Filipino classes (not Tagalog classes; Filipino literature classes, not Tagalog literature classes) in Philippine schools.
So what is the difference between Filipino and Tagalog? Think of Filipino as Tagalog Plus. Filipino is inclusive of the contributions of languages other than Tagalog. For instance, it is quite all right to say "diksyunaryo" (from the Spanish diccionario) in Filipino, whereas a Tagalog purist (or someone stuck in the "Pilipino" era) might insist on a native Tagalog word like "talatinigan." It is also more politically correct to refer to Filipino, not Tagalog, as the Philippine national language. For Filipinos from other parts of the country, Tagalog is not their first language; they learn to speak Filipino because it is constitutionally the national language and taught in schools.
In practical terms, most people, especially Filipinos overseas who have come to realize that foreigners favor "Tagalog" to refer to the Philippine national language, don't strictly differentiate among the words Filipino, Pilipino and Tagalog, and have learned to adapt to how Americans or Canadians perceive the meaning of each word. That is why when you go to a bookstore in North America, for example, you are more likely to find a "Tagalog (or Pilipino) dictionary" than a "Filipino dictionary."
Postscript: Philippino, Philipino and other such misspellings are unacceptable and are jarring to Filipino eyes. Remember: Filipino is the noun that refers to the Philippine national language and to the Philippine people (Filipinos); it is also an adjective to describe people, things and such from the Philippines (the other adjective being Philippine). The country itself is called the Philippines (currently the Republic of the Philippines; formerly, and actually still, the Philippine Islands) in English, Las Islas Filipinas or simply La/Las Filipinas in Spanish, and Pilipinas in Filipino (Tagalog).
Cultural Note: Although the word "Filipino" is acceptable in Filipino (the Philippine language), most Filipinos will still say Pilipino when referring to a Filipino person while speaking in Filipino/Tagalog.
For example: "Ako ay Pilipino." ("I am Filipino.")
Why? Primarily because a "p" sound is easier for a Filipino to pronounce than an "f" sound. In fact, even though the letters c, f, j, x, z, etc. have formally been included in the Philippine/Filipino alphabet, there is still an overwhelming tendency to transliterate foreign words into native pronunciation forms.
Examples: kompyuter, kwalipikasyon, okasyon, kendi, indibidwal, sipilis...