I could give a quick text answer but that will not really answer your question and those that would follow.
Please watch this video in full and a few times over. I did. It is from a world expert on the subject, concise and easy to follow with the proper background, thus why you have have to watch it a few times.
As I don’t know your level expertise I would also suggest that if you have other questions you watch other videos by Andrej Karpathy
Note: It would really help if you noted your level of expertise. (ref)