Languages in Taiwan

Visiting the island for some days, I noticed that there are more languages being spoken; Taiwanese, Haka, Mandarin and some other? What kind of language is Taiwanese? Is it an “invented” language unifying various similar aboriginal languages? Thank you

With its 7 tones that change with every utterance, it’s the devil’s language!

Seriously, though…https://en.m.wikipedia.org/wiki/Taiwanese_Hokkien

Mandarin came to Taiwan when the KMT arrived and they basically forced the island to speak it as the primary language.
Taiwanese is a different Chinese language that the Fujian (Chinese) immigrants brought to Taiwan 300-400 years ago. No relation to the aboriginal languages but I am sure that various words have been added in during the 300-400 years.
Hakka is a different set of Chinese immigrants that have their own language that they still use.
There are also 14 (or 16) recognized aboriginal tribes that have no ancestry ties to the Chinese. They have their own languages that are completely unrelated to Chinese. They (and their langauges) are as Chinese as Native Americans are European.

Most people under 40 speak Mandarin as a first language though. Those that don’t generally are a combination of the following: more remote villages, older or lower educational level.

Additionally many over 60 learned Japanese as a first language due to the Japanese occupation for decades of the island prior to WW2.

The details of this generalization of the languages can be picked apart for accuracy but the overview should be close to correct.