You don't really give enough information in your question as to the environment your talking about. So I'll make a few assumptions - you're talking about a web server/application of some kind, and you have >1 servers. The basic method is to designate one server as the initial point of contact for each request - that server is the load balancer, and it decides based on your criteria which of your servers should service that request.
The simplest routing from your LB would be to balance the number of users/sessions evenly between each physical server. The dispatcher code, is basically keeping a count of users and routing to keep those counts as even as possible. If you could monitor the load on each server and potential judge the probable load from a user, then your routing algorithm can be much more complex.
Another way of doing this is to use virtual machine images that can then be hosted accross multiple physical servers. There is a high end commercial solution from VMWare that does this, but does need human intervention.
Another approach is to code against 'the cloud' where you can host your app with Amazon, google etc and they can provide more capacity on the fly. Also most ISPs will provide a virtualised server environment to support peak loads - really useful in ticketing applications.
IMHO it's not easy to create a good load balancer from scratch, if you're trying to do this in a big production environment then a commercial solution makes more sense in the long run.