Connecting your account is a safe way to ensure that you won't lose your account and be able to keep your progress. You can also use this feature so you can link to multiple devices in case you want to switch from a phone to a tablet or vice versa.
On the game's main home screen, tap the gear icon at the top right of the screen to view the options.
At the bottom of the menu, you have the option to connect to either Google Play / App Store or Supercell ID.
Both of them work the same way, but it's probably easier to connect to Google Play or App Store if you already have an account. If you want to use Supercell ID, then you will have to make a new account. The main advantage of Supercell ID is that you will be able to carry your progress and transfer between Android and iOS freely.