We explore how the inverted index is efficient for query operations in an IR system, focusing on performing an AND query for two terms like Brutus and Caesar. Processing a query involves locating the terms in the dictionary and finding their postings lists to identify documents where both terms occur by intersecting the sets. The merge algorithm family assists in combining and sorting the lists to find the common documents efficiently through Boolean operations like comparing document IDs. Pointers are used to track and compare the doc IDs in the lists to determine the intersection, advancing based on the comparison results to extract the desired documents for the query.