An agreement in principle (AIP), sometimes called a decision in principle, is a lender saying "based on what you have told us, we would probably lend you around this much".
It is: quick (often same day), usually a soft credit check and useful when making an offer because estate agents often ask for one.
It is not: a mortgage offer. The full application comes later, with documents and a full check.
Documents to have ready: photo ID, three months of payslips (or two years of accounts if self-employed) and three months of bank statements.
A broker can arrange an AIP and, importantly, choose a lender whose criteria fit you before any hard check happens.