Purpose
Despite being the sequel to a game, the vast differences between each level of difficulty are designed to appeal to veteran players as well as ease new players into the game or genre. Many new players will typically start with the campaign that starts off by introducing you to each individual unit and progressing into full game play; but if you're feeling adventurous, starting a match against the AI can be worth it to test your multitasking skill.
Campaign Levels
The single-player campaign has four different difficulty levels available for each mission: Casual, Normal, Hard and Brutal. The difficulty level of each mission can be selected before you start each new mission without interrupting the flow of game play. Different achievements are available for each mission depending on what difficulty level you choose; the campaign can be repeated indefinitely, and each mission can be played individually multiple times, so don't worry about missing anything.
Custom AI Levels
When choosing to play a custom, non-campaign single-player game against the AI, there are six different difficulty levels: Very Easy, Easy, Medium, Hard, Very Hard and Insane. These levels are suitable for players of every skill level, and can be applied both to your opponent and allied AIs. The more difficult the level, the more complex and quick the AIs become -- so be prepared for a challenge.
Multi-player Levels
Multi-player difficulty is measured by the different leagues: Bronze, Silver, Gold, Platinum, Diamond, Master and Grandmaster. These leagues are occupied by other players only, not AIs. The league you are placed in depends on your skill level; as you improve, you can be promoted into higher leagues and face more highly-skilled players. Online play is completely optional, but has been popularized by Blizzard's revamp of the Battle.net system upon StarCraft 2's release.