It adds an additional layer of security to your account. When logging in to GitHub, after providing your username and password, you will be asked for a two-factor authentication code that is delivered to your mobile device via SMS or a free two-factor application.
To enable the feature, you may head to your account settings and you will see the two-factor authentication option, Github also provided a more detailed information here.
The Github feature works mainly for now in SMS and other authentication app. You may click on the official announcement by Github itself for complete details.