TextRank is an unsupervised graph-based ranking algorithm primarily used for keyword extraction and text summarization. It models text as a graph, where nodes represent text units and edges represent relationships between them, and ranks nodes using a variation of the PageRank algorithm to identify the most important elements.