It's a bit difficult to answer this in full, but you can check out the wiki, which is all I needed to learn. You'll find the basics here and a more advanced one here.