You need to build a community and train your people or troops for fighting. Once you have trained them now you can attack other people to earn gold and elixir. These gold and elixir then used to build defences for you and helps you in training and upgrading your troops. Your troops can be divided into five different categories like
Tier 1, Tier 2, Tier 3, Dark Elixir Troops and Heroes.
These troops are consist of different kinds of people like barbarians, archers, goblins, giants, wall breakers, balloons, wizards, dragons, healers, P.E.K.K.A.S, minions, hog riders, valkyries, golems, witches, lava hounds, barbarian kings and archer queens. According to these different kinds of people each and every troop is made whereas Heroes Troops are immortal. As a player you need to build gold mines or storages and elixir collectors or storages in order to earn and store all of your gold and elixir. This game is one of the best strategy game ever introduced as you can build your fighting skill with this game easily with its amazing and impressive 3D graphics.
Clash of clans is a game that runs on your device, but only the graphics and some simple in-game logic. For example, it knows what you can and can't upgrade, let's you change the layout of your base, and will tell you when your troops are ready training, even without an internet connection. But none of that will persist when you connect the game with the internet again. You could, for example, use a tool to make it look like your gems, gold and elixer are maxed out, and your phone might even tell you you can buy things with them, but when you do tap the upgrade button, nothing will happen until the game has checked with the server if you really have that amount of gold / elixer /gems.
Al that is because the in-game data is kept server side. Ever noticed how your attacked stopped the moment your phone lost it's connection, and when you logged back in saw only one star when you were sure you would have easily gotten three? That's why.
Here are some very simple and good reasons why the game data is kept server side:
•No easy manipulation of the data on the client side using hacking tools
•Avoid conditions where multiple people try to attack the same person
•Safeguard the internal economy
•Guarantee that if you drop your phone and it dies, you can log back into the game, using google+ for example, on your new phone
The downside being that is does require for the user to have a good internet connection, and for the server architecture to be able to handle the load.