A tag is a non-hierarchical keyword or term assigned to a piece of information (such as an Internet bookmark, digital image, or computer file). This kind of metadata helps describe an item and allows it to be found again by browsing or searching. Tags are generally chosen informally and personally by the item's creator or by its viewer, depending on the system.
Tagging was popularized by websites associated with Web 2.0 and is an important feature of many Web 2.0 services. It is now also part of some desktop software and allows users and the reader to describe, summarize and link by subject what is written and read in blogs and websites.
Examples
Within a blog
Many blog systems allow authors to add free-form tags to a post, along with placing the post into categories. A post may display that it has been tagged and those tags are usually a web link leading to an index page listing all of the posts associated with that tag. The blog may have a sidebar listing all the tags in use on that blog, with each tag leading to an index page.
For an event
An 'official' tag is a keyword adopted by events and conferences for participants to use in their web publications, such as blog entries, photos of the event, and presentation slides. Search engines can then index them to make relevant materials related to the event searchable in a uniform way. In this case, the tag is part of a controlled vocabulary.
Social Bookmarking on the other hand is a way for Internet users to organize, store, manage and search for bookmarks of resources online. Unlike file sharing, the resources themselves aren't shared, merely bookmarks that reference them. Descriptions may be added to these bookmarks in the form of metadata, so users may understand the content of the resource without first needing to download it for themselves. Such descriptions may be free text comments, votes in favor of or against its quality, or tags.
Example: del.icio.us
del.icio.us, is a web-based social bookmarking manager which enables users to bookmark web pages and add tags to categorize their bookmarks. It is very similar to the “Bookmarks” or “Favorites” folders in Firefox or Internet Explorer, except much better.