Just buy the book Programming Handbook by Peter Smid. Read / study the first  100 pages or so. Them continue through the book. The book will be a lasting reference.  There are videos, numerous sites with basic information, and of course all the Mach manuals. The above will give you  a firm foundation and understanding of CNC. CNC is NOT plug and play and you need to walk the learning path. 
BTW, the learning never ends .....................,
RICH