Learn to write and read from memory:
http://blackandodd.blogs...-process-memory-in.html
Learn windows API to learn how to simulate mouse clicks and key presses.
This is a bot I made for MTG: Puzzle Quest:
https://github.com/tgonzalez89/mtgpqBot
You can see there how to simulate mouse clicks.
This one didn't read or write to memory, it used screenshots from parts of the game I needed to recognize in order to compare against those images and get the game info that way.
A bot for Hearthstone probably uses a combination of reading from memory and reading from game log files.