The Catalan language
Even if numerous tourists call Catalan a "Spanish" dialect, this statement lies far from the historic reality. Both languages do not have more in common than the multicultural Roman origin and the language family.
All historical notes prove that Castilian (castellano) and Catalan (català) have possibly appeared at the same time but in different regions of the current Spain. If you evaluate the written documents, you'll discover even that the Catalan language may be a little bit older than Castilian. The writer and philosopher Ramon Llull (1235 - 1315) is considered as the creator of the classic Catalan language.
The expression "to speak Spanish" is, at least in the Spanish area, mostly a political way to claim that every other language has to be rejected in this country. In Catalonia this expression is often understood as a disregard of the national language and should not be used, not even by tourists. In officially written documents of the Spanish state in Madrid the Spanish language is also named Castilian and not "Spanish"..
Even if the population of Catalonia communicates with their guests in Castilian, you should know, however, that they in this case generally use their second language to welcome you. However, more than 4 million Catalans speak, foreign guests are not counted, neither at home Castilian nor with their friends but use in these circumstance their native language which was forbidden when Franco was alive, but continued to live everywhere.
Today the Catalan language is teached in every school of Catalonia, what means naturally, that every child grows up with two languages. Catalan is also currently used as the usual language in offices and, everywhere in Catalonia, even if many guests do not discover it at first sight.
Catalan is neither a dialect nor a "sub-language" which is just spoken to friends, but bears, like every independent language, also a culture. You'll find Catalan television, Catalan radio broadcasting, but also Catalan literature, Catalan music and corresponding art styles. To accept the Catalan language means the same time to discover another country and to open to a new culture. "Catalonia is not Spain", but in a certain way an independent country within the large area of Spain.
But even those who prepared their stay, perhaps with the help of a language course, will find out that Catalan, just like every other language, has its own dialects and requires sometimes a time of "adaptation". And sometimes you'll encounter other barriers, because the few fishermen who still live in Tossa de Mar, to name en example, often use words which are not in a Catalan dictionary. They use their own language.