Companies are only legally required to confirm your employment status (did you or did you not actually work for them) and your dates of employment.
Calls to HR departments seeking further information are routinely deflected. No company wants to risk the legal ramifications of giving out more information than required.
Calls to former direct managers or supervisors (assuming they can be found) are not quite so cut and dried. People can, and do, say whatever they want.
Smaller organizations (total employment less than 99) don't necessarily follow the same rules either. Really small organizations, by virtue of their natural informality, can be difficult to control.
All of the preceeding has to do simply with a prospective employer determining if an applicant departed from a previous organization by virtue of resignation or termination. The reasons for either are a little more difficult to find out, although with some clever but simple probing it's not too difficult.
Overall, generally speaking, the chances a prior termination for cause and the reasons for that termination would be found out are pretty low...not more than 10%-20%.
BTW, it's an extraordinarily bad idea to not disclose a previous employer because you'd been fired. As you say, a background check can determine your actual employment history, and if you don't fully disclose you not only have something to explain you've given your new employer a reason to immediately fire you. You also have to account for your time...unless you're willing to put a period of unemployment on your resume in place of a job you'd rather not admit you held, or are willling to lie on your resume (an extremely, monumentally bad idea) it's best to put down the job and honestly answer any questions that may come up.
I really wouldn't worry too much about this.