You seems to know you have to learn coding to achieve your goal. So why are you asking a question that you know the answer?
You have to learn C++. Good book is C++ Primer.
After that you can read some publications about AI. There is pretty much on the net for that. Very interesting and complicated topic is navigation(A* and such).
Once you have at least lightly understanding of these things, you can start modifying existing bot sources to get more familiar with the things.
After that you can pick a game that have development SDK for plugins and start playing around.