A trademark is, broadly speaking, any mark that is used for indicating goods or services in commerce. Usually, it is necessary to register the mark with a local trademark office before it gains protection under trademark law. The exact rules differ from country to country, and sometimes you also have some kind of protection without registering the mark first.
A trademark can be one or more words or an image (a logo). Sounds and colors can sometimes also be used, but this is more difficult and may not be permitted in all countries.
To indicate that a word, phrase or image is a trademark, the suffix TM can be used. Note that this indicator has no legal status in countries where only registered trademarks are protected against use by others. A registered trademark is indicated with the ® symbol.
A trademark is intended for use in a certain class of commerce, for example selling food, air travel or computer programs. This has to be indicated during registration. A trademark is also limited by a certain scope, the area in which it is used. So, if one person holds the mark "Aero" for air travel, someone else can hold that same mark for air fresheners. Only when the other person's registration can be seen as damaging to the first mark can this be prevented (for example, using a whiskey's name for a toilet cleaner would not be permitted, even though these are different classes).
Similarly, a bakery in one city can not prevent someone else in another city from opening a bakery with the same name. The first bakery would have to be a national chain in order to prevent this. This of course causes problems on the Web, as domain names are not limited to a specific location: there can be only one aero.com, but is it the air travel or the air freshener company who has the right to it? These issues are difficult to resolve, but most countries have adopted a "first come, first serve" policy. So, the first holder of "Aero" would get aero.com, and the other would have to pick something like aero-travel.com.
A trademark is said to have a "strength". A strong mark is one which is very clear to the public. This is often a made-up word, so that no confusion with competitors or ordinary household items can arise. A weak mark is hardly recognized as such. The weaker a trademark is, the harder it is to take action against people who use the mark.
When you need to pick a name for your own Website, it may be worthwhile to pick something that can be registered as a trademark. This gives you extra protection against others who want to provide the same kind of site, and it makes it easier to distinguish your site from theirs.
More information on patents, copyright, trademarks and other Internet-related law is available on Iusmentis.com.