The basis of limited liability is that all debts incurred by a company are the company's liabilities and not directly the legal liabilities of the shareholders or of the directors. The company is a separate legal person from the shareholders and the directors. The company incurs debts in the course of its business and only the company is liable for those.
In a company limited by shares, the shareholders' obligation is to pay the company for the shares they have taken in it. Once the shares are fully paid for (and this would usually be the case with a private limited company) no further money is payable by the shareholders.
The members of a company limited by guarantee are bound by a guarantee in the company's memorandum of association requiring them to pay the company's debts up to a fixed sum, which is usually £1.
The directors incur no personal liability as all their acts are undertaken as agents for the company. However, there are certain circumstances where liability may be imposed by the court, particularly in respect of wrongful or fraudulent trading. See related topic: What liabilities could directors incur? .