There is no technical difference between http://www.mydomain.com and www2.mydomain.com, they are purely names that someone has decided to use.

Putting a prefix on a domain name is actually technically a subdomain of your domain. You can create any number of subdomains on a domain - some common ones are secure.mydomain.com, mail.mydomain.com. Some companies use subdomains to split up their website into regional areas: uk.mycompany.com, london.uk.mycompany.com, us.mycompany.com etc

Over the years since the internet first began, it has become a standard that people always create the www. subdomain on their domain, but it is still up to the website owner to set it up if they wish. If you have seen www2.somedomain.com then the owner of the domain/website has chosen to set this up, perhaps because they have a different site on it that on the http://www.somedomain.com or because the site on www2 runs from a different webserver.

If you want any information on how to set this up, you need to read up on DNS. Let me know if you want any information on this.