Tagalog is one of the Top 40 languages of the world with 24 million first-language speakers and over 65 million second-language speakers.
Tagalog is native to the country’s Katagalugan region, which is basically the country's capital Manila and its 10 adjacent provinces in the central to southern part of Luzon island plus certain parts of the islands of Marinduque and Mindoro.
Tagalog, which belongs to the Austronesian vocabulary is composed mostly of words of Austronesian origin with borrowings from Spanish, Min Nan/Hokkien Chinese, Malay, Sanskrit, Arabic, Tamil, Persian, Kapampangan, languages spoken on Luzon, and others, especially other Austronesian languages.
On the other hand, the “Filipino" language is the name of the official language of the Philippines, and this official language was based on Tagalog.
There are many other languages spoken in the Philippines (such as Cebuano, Ilokano, Ilonggo) but when the Philippine government decided to choose an official language for the country, they chose Tagalog to form the basis for that official language (which came to be known as Filipino).
The Surian ng Wikang Pambansa (the National Language Institute, now called the Komisyon ng Wikang Filipino) was mandated to do this task. It was the Surian’s first director Jaime de Veyra who is credited for proposing that Tagalog be the basis for the national language. On November 13, 1936, the Surian ng Wikang Pambansa chose Tagalog to form the basis of the national language, based primarily on pervasiveness both in speech and literary work, as well as for being the language spoken of the country’s capital, Manila.
The Institute then published in 1940 an official grammar and dictionary, the Balarila ng Wikang Pambansa (Grammar of the National Language) written by Lope K. Santos, and the Tagalog-English Vocabulary.
That Filipino alphabet, a Latin script which now consists of 28 letters, has evolved considerably from the time of Lope K. Santos, who officially introduced a 20-letter “ABAKADA” alphabet which was then adopted by the National Language Institute in 1973--the same year when “Pilipino” was defined by law as the national language.
The national alphabet expanded to 31 letters—the 26 letters of the English alphabet, the Spanish ń, ll, rr, and ch, and the ng of Tagalog—and again in 1976 to include the letters C, Ch, F, J, Ll, Ń, Q, Rr, V, X, and Z in order to accommodate words of Spanish and English origin.
By 1987, the alphabet was then reduced to 28 letters, removing rr, ll and ch, all of which are of Spanish origin, and concurrently the name of the official language was changed from “Pilipino” to “Filipino”. Along with this change, several "old-style" spelling rules were revamped (e.g. "Caloocan City" became “Kalookan City”) while transliteration began to be shunned in favor of direct equivalents (e.g. “Pamantasan” for “University” instead of “Unibersidad”) and--as appropriate--assimilation (e.g. “computer” instead of “kompyuter” for “computer”).
Thus, Filipino is the mandated medium of instruction for some school subjects throughout the country--including in locations where Tagalog is not spoken (e.g. in Cebu province where Cebuano is the native language).
Today, the modern Filipino language is the de facto standardized version of Tagalog, though is de jure distinct from it. Filipino is considered by Ethnologue to be a variant of Tagalog, a Central Philippine language within the Malayo-Polynesian branch of the Austronesian language family. As a result, Tagalog is highly similar to Filipino, but they are not exactly the same.
From a practical standpoint, the main difference is that Tagalog is less adaptable to change (as it has solid roots in its geographical origins wherein it is spoken in more or less unadulterated form) while Filipino is more flexible because it more openly lends itself to influences not only within the country (i.e. among non-Tagalog speakers such as those who speak Cebuano) but also outside the country (e.g. English).
Thus for applications that may involve a more modern, natural and politically correct writing style--especially in localization—Filipino is more appropriate than Tagalog to achieve the mission of touching base with the Philippine market and Filipinos in general.