The relevant provision of the Lanham Act, I believe, is
§ 2, at least to the extent that it generally defines what a trademark is and provides for registration of non-conflicting marks:
No trademark by which the goods of the applicant may be distinguished from the goods of others shall be refused registration on the principal register on account of its nature unless it
. . .
Consists of or comprises a mark which so resembles a mark registered in the Patent and Trademark Office, or a mark or trade name previously used in the United States by another and not abandoned, as to be likely, when used on or in connection with the goods of the applicant, to cause confusion, or to cause mistake, or to deceive
The first part essentially defines what a trademark is, i.e., something by which the goods of a party may be distinguished from others' goods. The second part says that the PTO won't register a mark if it conflicts with a prior mark, i.e., if the use of the junior mark is likely to cause confusion with the senior mark. That second part is essentially the test for infringement, as well.
Goods or services that are sufficiently distinct from one another may peacefully co-exist (e.g.: "Delta" for airline services, faucets and power tools; "United" for moving services and airline services; "Burlington" for clothing, transportation and others; etc.).
Finally, I disagree with Isaac on the "Microsoft" example. Would anyone be confused between the software maker and the manufacturer of sheets and bedding who came out with a "microsoft" line of high thread count, premium quality bedding? Of course, dilution is another consideration, but that's not immediately relevant here, I believe.
- Jeff