Google Analytics accurately tracks visitors from a source, such as a search engine or email link, to a conversion or transaction on your site. Using campaign tracking tags allows you to easily find tracks of certain link clicks within analytics by providing those links with 'tags' that stand out in the analytics reporting suite. For more information and how to check your tags in analytics check out Google's Guide.
Each visitor to your site enters via a link indicating where he/she clicked from, the keywords they used, if any, as well as campaign and medium information. Google Analytics parses the link to obtain this information.
The information is gathered by the tracking code installed on each of your web pages. You can add the code manually into each web page or automatically using server-side includes and other template systems. Once installed, the tracking code is triggered each time a visitor views the page.