The main part of attacking in Clash of Clans relates to your troop management. You can build Troops in the Barracks, and they are housed in the Army Camp.
You are able to upgrade Troops using the Laboratory. Troops in Clash of Clans can be basically assigned into three tiers.
In the first Tier, the troops are weak but excel when used in large groups, popularly known as mobs. They are the fastest units to train and are cheap to produce. As a result, so that they are not overpowered, they have low health and can't do very much damage to other units. This is why they work best en masse, in a swarm. They are good at drawing fire from enemy defences so that higher value units can continue their attacks - also, when focused in one place, they can be very useful.
You should aim to avoid targets that deal 'splash damage', as this can wipe out your entire attack with one shot.
In Tier 2, Troops are more powerful and tend to focus on one specific objective, such as walls or turrets. Wall Breakers, as their name suggest, are ideal for dealing with enemy walls. Giants and Balloons specialize in handling enemy defenses, while units such as Wizards are good for support. Incidentally, Balloons are the first airborne unit in Clash of Clans, which has obvious advantages. Due to their greater strength compared to Tier 1 units, having Troops that are made up primarily from Tier 2s is a good strategy, if you can afford it.
Picking the right units to train and deploy is a delicate science
The final tier is Tier 3, which is the most powerful tier, and boasts troops which are able to turn the tide of battle without too much trouble. As a result of this, they are prohibitively expensive. They also take a very long time to train. Often, despite their strength, it is more worthwhile to spend your time and money on lesser units in greater number.
Hero troops are not exactly a tier, but they are separate to any other and are the strongest in the game. They are also immortal, which means they can't die so you will never have to train them for a second time. If they are defeated it battle, rather than losing them and having to train them again, you instead are required to wait for them to regenerate before you can call upon them again.
In addition to these, you also have Dark Elixir troops, which were added to the game alongside the Dark Elixir resource - they are similar to Tier 3s in that they are very expensive. You will require Dark Barracks to be able to build these troops.
While troops are mainly focused on attacking, you are also able to use them as defensive aids once you unlock the Clan Castle.