Trademarks are the source identifiers that allow consumers to differentiate one good or service from another. For instance, a swoosh identifies a shoe originating from Nike, whereas three stylized stripes indicate the shoe comes from Adidas. Trademark owners may come after you for infringement, if you use their trademark in such a way that causes confusion in the marketplace or implies endorsement or connection with the brand, where none exists.
But, there are a couple of narrow scenarios where you may use another party's trademark without infringing on the owner's rights - descriptive fair use and nominative fair use.
Descriptive fair use allows you to use a descriptive trademark to describe your product or service - which means, the trademark is not being used to indicate the source of the goods or services, but instead to describe the goods or services. For instance, if a diamond company uses the mark HYQUALITY - a unique spelling of "high quality" - a competitor is able to use "High Quality Diamonds" to describe its goods as the trademark owner's rights are limited to its unique spelling.
Nominative fair use allows use of another party's trademark to refer to the trademark owner's goods and services. This is acceptable if: (1) the product or service is not identifiable without use of the trademark, (2) the user only takes as much as is reasonably necessary to identify the good or service (for instance, avoiding use of logos), and (3) using the mark does not imply sponsorship or endorsement by the owner of the trademark. For example, a phone repair company can say in its advertising "We repair iPhones" because the product is not identifiable without use of the trademark, the user is only taking the bare minimum to identify the good, and the use does not imply a connection to Apple.
Whether considering use of another's trademark in advertising, social media, articles, or other places (online or not), being familiar with the line between trademark infringement and trademark fair use is critical to limit liability and mitigate risk. Each case requires its own analysis of the specific facts involved, so proceed cautiously and speak to an attorney as you consider using another party's trademarks.