How do they check?
Most employers outsource payroll and those payroll companies sell the data. You can get the employment record of most applicants this way.
HR actually calls/emails to verify employment dates/eligible for rehire, though I wouldn't be surprised if some of it was automated (like the other poster noted) through payroll data to catch the omitted company B.
For most companies they'll just find them directly and call, and if they can't for whatever reason (company doesn't exist anymore, multiple companies with the same name) they'll ask the candidate to provide a point of contact.
Of course now that I said that out loud I suppose the next step for a candidate is to provide a fake number/email as a reference, but that doesn't really work if you say that you worked at Amazon/etc.
1. I just took some time off between Job A and C (when really there was a job B inbetween)
2. I tried to start a company between Job A and C (when really, again, there was another corp B)
3. I was at Job A the whole time (when really the progression was A -> B -> C -> A again)
4. I went straight from Job A to Job C (when, again, there was a job B) and the dates get fudged +/- a few months
I usually ask about the resume just as a conversational thing at the end of the interview, but my company's pretty strict about checking history so they get denied for any of the above reasons.
We appear to be the exception, since most candidates express a lot of surprise that we even bothered to check.