The other party has a filing or registration for similar goods or services
When another company has already applied for or registered the mark you had in mind, and its products or services are similar to yours, that company holds the rights to the mark. In most cases, the practical answer is to pick a different trademark for your own registration.
Countries with common law systems
Some countries, such as the U.S., follow a "common law" approach. There, a business that used the mark before your filing date may hold legal rights in it, depending on how extensively it has been used.
Limited use by the other party
If the other company has used its mark only briefly or in a small area, you may still be able to file your own application with the Trademark Office. Keep in mind, though, that such an application is very likely to be rejected.
If you need help weighing your options, Marcaria.com is here to assist at trademarksupport@marcaria.com.