As a trademark is intended for use in commerce, trademark infringement can typically only occur in commerce-related activities. The mere mention of a product in a book (such as "John drank a bottle of Coca-Cola") is not trademark infringement. However, such use can be seen as weakening the mark, because the mark is then often used as a label for a generic product, and not that specific brand. Thus, people who use "xeroxing" for photocopying or "Hand me a kleenex, I've spilled my coffee" may still get angry letters from Xerox or Kleenex, demanding that they stop using their name. So be careful when you use someone else's trademark when you don't have to.
People who review products or services do need to mention the name of that product, and this name is often trademarked. It is common practice to write the name followed by TM or ® to indicate this, but don't do this every time you use the name, as this makes the text very tiresome to read. Alternatively, you could end the review with a generic text like "A, B and C are registered trademarks of company X".
The same rules apply for using the logo of a product, which is often also a trademark for that product. However, in addition to trademark protection, this logo also has copyright protection when it is more than just a name in fancy letters. Using the logo may then be seen as a copyright violation.