A trademark class is a categorization of goods/services that the trademark is used with. Each trademark must be registered with at least one class of goods or services. See the Complete List of Trademark Classes. The class or classes associated with a trademark is an important distinguishing component of a trademark. Two registered trademarks may exist at the same time with the same mark, if each one is assigned to different classes of goods/services, and provided that there is no likelihood of confusion, or possibility of mixing the two up.
A good example of this is Dove Soap and Dove Chocolate:
Dove Soap Trademarked Logo
Owned by Unilever
Dove Chocolate Trademarked Logo
Owned by Mars
Though both products share the same "Dove" name, both are registered trademarks owned by different companies. This is possible because the two trademarks are associated with different goods. One is associated with soap and beauty products, while the other is associated with chocolate. Thus they are registered to different trademark classes and there is no likelihood of confusion (it's unlikely that one would mistakenly eat a bar of Dove Soap thinking that it is Dove Chocolate).
Therefore, trademarks with different goods/services can be registered as long as there is no likelihood of confusion. Suppose that there is an existing trademark for “Dell” in association with class #9 (computers) but no “Dell” trademark in association with any other class. It is possible to apply for and obtain a “Dell” trademark for class #25 (shoes).