I would say by watching and reading some tutorials about it, just to get started and gather some basic knowledge, but then in fact the best way to learn is to start working on your won project, start creating something that you will be using for affiliate marketing and test how things are working out. Very good way is also to join forums and online discussions, like this one, and see experience from other people, especially as here you can find some real life examples and learn how something can be solved, and so on. Be active, take part in communications about affiliate marketing, join some online seminars, etc.