What do the tags mean from IR perspective?

I’m trying to define the popular concept of “tags” in terms of the Information Retrieval and to find an appropriate algorithmic strategy for to automate the processes of choosing the tags for text documents.