1. If you have an unrestricted right to (paid) work in the UK, your right to volunteer is probably unrestricted too. This is usually the case for people from an EU member state or certain other countries.
2. If you are a "visitor" to the UK (EG: Tourist but not a migrant) you may undertake "incidental" volunteering (i.e. the main purpose of the visit is not to volunteer), provided it lasts no more than 30 days in total and is for a charity that is registered with either the Charity Commission for England and Wales; the Charity Commission for Northern Ireland; or the Office of the Scottish Charity Regulator. More information here. Note that not all the organisations we recruit for are registered charities.
3, For other people/situations, a Tier 5 (Temporary Worker - Charity Worker) visa may be suitable. More details here Very few if any of the volunteer opportunities we handle are feasible through this scheme. A UK-wide list of organisations (not just charities) registered to sponsor people on thiis scheme is here
4. Many people from outside the UK would like to come here and volunteer fairly intensivley for a few months. That's great but we can't really help. Most of the roles we offer are where a volunteer helps out for a short time each week for years. You may find an agency in your own country more useful. (EG: Go Overseas in the US)