I'm trying to understand how to make like twitter bots....

Like, I want to make a bot that will follow a tag, or tags, and actively engage with users posting in those tags, be it a retweet, a favorite, or an auto-generated response.