This varies from place to place and sometimes with time, as well as the relationships of the countries involved.
In general, it is a reasonably safe bet that some sort of work permit is required to do billable work onsite for a customer in another country. The form of work permit may vary. For example, if you are a professional in IT services with a 4 year degree (whether it is related or not), and an American travelling to Canada to work, you can get a NAFTA-related permit on arrival (last I did this it was $150 CAD). The same, I believe, is true of Mexicans entering the US for such things, or to Canada, and Canadians entering the US and Mexico, since it is governed by NAFTA.
Similarly, with the UK, answers will probably depend on whether you are coming from another EU country (I would expect low to no visa requirements, but check with a lawyer since it is better to be safe than sorry), coming from a commonwealth country (in which case I am not sure, but would expect no or minimal visa requirements), or other countries. I would expect it to be easier to go do work in the UK from Canada or Australia than from the US.
The point is that this question rarely is answerable even in the case of a single country regarding a single set of rules. The relationship and trade agreements between countries are necessarily important because you are, in effect, trading services.
In the telecommunicating example, this varies with local law, so be sure to ask a lawyer. Many countries in fact do allow telecommuting to a business outside their borders without a work permit but some do not. I don't know specifically about the UK. I suspect with most countries, like the UK, you are more likely to run into length of stay issues when working for an employer or client in your home country while residing there. I would not expect this to be an easy way to a long-term stay (again unless there are other treaties involved). However there are exceptions. I know someone who lives in Malaysia and owns a house there but leaves every three months for a weekend or so he can get a new entry visa. Many countries don't look kindly on that practice though.
This would be a good question to ask on the expat SE site when it enters beta (commit to it on area51 today).