Understanding VBA

Hi, I've been using excel for a while and I just started studying the more advanced features of excel and came across VBAs. I was wondering when the best time to use VBAs are and what is a good way to get a better understanding of the different code used.