There are three light subclasses, and two dark subclasses. The only way to access the dark subclasses is paying for the expansion pack.The light subclasses are already unlocked once you create a new character.
The Solar subclass focuses on burning your enemies with fire. The abilities are also buffed by an effect called Radience. the effect greatly buffs Solar weapons and abilities. The Solar class synergizes with the Void class because it relies on your enemies being grouped up which you can easily do with the Void class.
The Void subclass has abilities that make you invisible, and makes traversal easier, such as a triple jump and a vanishing dodge. The purpose of the Void class is to sneak attack enemies to deal a lot of damage in one blow with one of the supers.
The Arc class is used to blind and disorent your opponents. The abilities and Grenades all inflict a blinding effect, turning your screen white for a short while.
The Strand subclass is unlocked fully when you purchase the "Lightfall" expansion pack. The class contains many powerful abilities, including a grappling hook, and many powerful melees along with crowd control abilities.
The Stasis class is like an ice class. The abilities that you use freeze and slow enemies.
Note: each gun/weapon in Destiny 2 has some sort of class, it can also just be a physical weapon class with no type of class (Strand, Stasis, Arc, etc.)