Inverted indices are a data structure used to store a mapping from content, such as words or terms, to their locations in a database or document. This allows for efficient full-text searching and retrieval, as it enables quick access to the documents that contain specific words without needing to scan each document individually. Inverted indices play a crucial role in search engines and databases by allowing them to efficiently manage and query large volumes of data.