In a technical sense, virtual hosting is a way for a server to have multiple domains on the same machine. This type of virtual hosting may either use a shared IP address for the entire machine or multiple IP addresses.
In common usage, virtual hosting describes any situation in which a web host offers space on one of their machines for webmasters to rent. This is in contrast to both co-location and dedicated servers.
With a dedicated server, the webmaster has purchased an entire machine from the host, including the connection to the Internet, an IP address (or multiple IP addresses), and usually set-up and technical support. With co-location, the webmaster supplies the actual hardware himself, but the domain is hosted by a third-party with a connection to the Internet.
Virtual hosting is a much cheaper alternative to these two forms of hosting. By having many different webmasters use a single machine, the host is able to charge less money to provide server space and an Internet connection.
Since virtual hosting is usually targeted to smaller businesses, individuals, and those without much experience with network issues, it nearly always comes bundled with an assortment of services. These may include: help setting up a domain name, technical support, e-mail addresses, installation of server software, database assistance and even basic design services.
Virtual hosting usually comes with a single IP address, but it may come with services to allow for multiple domains pointing to the same IP address. This allows a single virtual hosting account to have more than one domain name, usually simply redirecting to the same site.
Virtual hosting accounts often use a bit of redirection to deal with a single IP address for one machine hosting multiple accounts. When a user enters the website they wish to visit, they are taken to the corresponding IP address —- when they reach that machine, the server asks which site they want to visit and sends them to the appropriate directory on the server. So a user who goes to http://www.test.com/ may be sent to http://127.0.0.1/accounts/test/www/.
For all intents and purposes, a virtual hosting account appears to be its own server. From a webmaster's perspective and a user perspective the integration is essentially seamless. Webmasters concerned about sharing resources, or some security issues, often find co-located or dedicated servers to be more to their liking —- but for most small- to mid-sized businesses and individual webmasters, virtual hosting is an ideal solution.