It is possible to trademark a domain name that you use, but there are certain requirements. The Ninth Circuit Court of Appeals has ruled that a business must use their trademark domain name to sell a product or supply a service in order for the registration to be granted and the trademark and domain name be protected. In plain English, if a competitor or anyone else reserves the domain name that you have decided to register and use it as a symbol of commerce for your company, you win the rights to use it.
The US patent and Trademark Office defines a "domain name as part of a Uniformed Resource Locator or URL, which is the address of a site or document on the internet." In this address, there are two different levels of domain. The second level is what the actual trademark registration is for. These are the words and or numbers before the dot. The top level domain is the word to the left of the dot. For example there are com, org, gov to name a few. These are already owned but can be incorporated into your trademark domain name.
When it comes to registering a domain name, the ones in.com,.org,.net are considered to be open. You may use any name that you wish as long as you do not violate and trademark laws or registration agreements.
One of the more controversial situations is cyber-squatting. This is when a person or organization purchases a domain name with no legitimate purpose other than selling it for a profit. A good example is Pepsi.com. If you are not associated with that corporation and are selling soft drinks, then you would be considered a squatter by trying to force a high payment out of the Pepsi Corporation for the right to use the site. This is a clear cut example since the word Pepsi itself is protected under the trademark provision.
Just because you were first to purchase the name for an online company does not mean it can be a trademark domain name.