Intelligence determines how well your character learns and reasons.
Some of the things which a character's Intelligence score affects are:
Skill Points- A character with a higher Intelligence score will have more skill points at first level and at each additional level than a character with lower Intelligence. Note that increasing your Intelligence will not grant you additional skill points retroactively.
Wizard Spellcasting- A Wizard gains bonus spells based on their Intelligence score. In addition, Wizards must have an Intelligence score of at least 10 + the spell's level to learn a spell of a given level. For example, a Wizard must have an Intelligence score of at least 15 to cast a 5th level spell. Wizards also use their Intelligence modifier to determine the Difficulty Class (DC) of their spells.
Intelligence is important for Wizards, Swashbucklers, Rogues, and any other character who wants to have a strong assortment of skills. At 3rd level, Swashbucklers can add their Intelligence bonus to their damage rolls with light weapons. Note that Sorcerers, Bards, and Warlocks do not use Intelligence for any of their spellcasting - they use Charisma instead.