Codebase indexing VS chat with codebase

Hello, new user here. I am in the phase of comparing this new AI first IDE -Cursor- with other options. How does Cursor actually index my codebase?