In Twitter, a sub-set of advertisement is dedicated to targeting users who have tweeted certain keywords, such as the ones mentioned in the question.
Twitter offers to businesses the ability to do promoted tweets to be able to target individuals who have tweeted things that the business has highlighted as a common keyword that is associated with the products they sell.