There are three kinds, and they are very different experiences. The IRS splits them first into audits conducted by mail and audits conducted in person, and then names the in-person ones by where they happen. An audit by mail, called a correspondence examination in IRS operational vocabulary, arrives as a letter asking for documents on one or two specific items and is resolved without anyone meeting; the IRS says a taxpayer with too many records to mail can request a face-to-face audit instead. An office audit brings the taxpayer to an IRS office with records for a defined list of issues. A field audit sends a revenue agent to the taxpayer's home, place of business, or accountant's or representative's office, and it is the one that reaches whole-return and business questions. Publication 556 puts the location rule plainly: "Some examinations are handled entirely by mail. Examinations not handled by mail can take place in your home, your place of business, an Internal Revenue office, or the office of your authorized representative." The examiner will try to accommodate an inconvenient time or place, but "the IRS makes the final determination of when, where, and how the examination will take place."
Selection is mostly mechanical. Returns are chosen by computerized screening, by random sample, or by an income document matching program that compares the return against the Forms W-2 and 1099 filed about the taxpayer. A mismatch notice generated by that matching program is the commonest form of contact and is often resolved with one letter. Being selected does not imply an error and does not imply dishonesty.
You are entitled to representation, and the list of who may represent you is set out in the publication itself. A taxpayer may act on their own behalf or be represented by "any federally authorized practitioner, including an attorney, a certified public accountant, an enrolled agent (a person enrolled to practice before the IRS), an enrolled actuary, or the person who prepared the return and signed it as the preparer." That last clause carries an important qualification: a paid preparer who is neither an attorney, a certified public accountant nor an enrolled agent has only limited representation rights, and one who holds nothing but a preparer tax identification number has none at all.
Two protections almost nobody knows about. The first is statutory. Section 7605(b) provides that "No taxpayer shall be subjected to unnecessary examination or investigations, and only one inspection of a taxpayer's books of account shall be made for each taxable year unless the taxpayer requests otherwise or unless the Secretary, after investigation, notifies the taxpayer in writing that an additional inspection is necessary." The second is administrative and narrower: Publication 556 says the IRS "tries to avoid repeat examinations of the same items," and that a taxpayer whose return was examined for the same items in either of the two previous years with no change proposed should contact the IRS to see whether the examination should be discontinued. Raising either point costs nothing and is sometimes decisive.
Third-party contacts require notice. Before the IRS approaches banks, employers, neighbors or customers about a taxpayer's liability, it must give reasonable advance notice, and it must provide a record of who was actually contacted, both periodically and on request. The requirement does not apply to a pending criminal investigation, where notice would jeopardize collection, where notice might result in reprisal, or where the taxpayer authorized the contact.