In general, you can buy someone's trademark, but you may also need to buy or license the whole product line or business associated with the trademark, along with the goodwill. Purchase of a naked trademark, without the underlying product, technology, etc. may be found to be invalid even if you sign a purchase/assignment agreement with the current owner and pay money.
The important thing to realize here is that, unlike copyrights or patents, trademark have no real value or protection UNLESS they are used with a particular product and embody that product's qualities and characteristics.
One of the most important goals of trademark law is to protect consumers and their expectations as to the quality of products being sold under a trademark. Therefore, if you buy someone's trademark, you need to ensure that any products you start selling under that newly purchased mark have the same qualities and characteristics as the products that were being sold
under this mark by the previous owner. That may necessitate purchasing not only the trademark itself, but also the know-how, technology, manufacturing processes, recipes and/or other any other information and/or assets to make sure your products match consumers' expectations as to the trademark.
Of course, if someone is using a particular word as a trademark, it does not necessarily mean you need to buy that trademark in order to be able to use the same mark on your own goods. It is quite common for unrelated companies to use the same or similar marks on unrelated products, as long as there is no confusion in the marketplace. But that is a different subject.
I hope this helps. Good luck!
PLEASE ALSO NOTE THAT NOTHING ABOVE SHOULD BE CONSTRUED AS LEGAL ADVICE OR A SUBSTITUTE FOR LEGAL ADVICE. THIS INFORMATION IS FOR GENERAL EDUCATION PURPOSES ONLY. I AM NOT YOUR ATTORNEY.
Sergiy M. Sivochek, LL.M