Since several members here have small CNC machines for modeling I thought it a good idea to write a quick article on CNC Programing. I'll focus on the fundamental concepts that relate to safety and avoiding machine damage. There are plenty of books and online resources for learning how to program and numerous software packages that write the programs for you. Using these tools are great however there are some things you should check for in any software generated program and basic concepts you may skip over in your rush to start making parts. This is not meant as a full tutorial, I expect you to look most of it up yourself and suggest purchasing a good programing book even if you will be using software to write the programs.
The Safety/ Startup line: Places the machine in a know safe status at the start of a program or operation. It should include Dimensioning system (metric/ imperial, absolute/incremental), cancel active cycles and cutter offset, plane selection, default feed rate selection.
Coordinate systems: Understand how X, Y, Z coordinates are described and relate to your machine. Know how The selected cutting plane affects circular interpolation.
Dimension Units: Is you machine going to cut in metric or imperial units?
Feed Rates and Modes: Will the tool move at rapid speed or a programed rate? How do distance/ time and feed/ revolution relate to each other and affect the machining process? Will the machine move to an absolute position or move the specified distance relative (incremental) to the start point.
Modal Commands/ Groups: Some commands remain in effect until canceled or replaced by another in their group. This can reduce typing and program size but can also produce unintended features in the part.
Tool Offsets: In most cases you will only be concerned with tool height. Get it wrong and you could run the tool into the part or clamps, cut too deep or shallow, or damage the tool.
Work Offsets: Tells the machine where the part is and used for making multiple parts on one setup.
Know you Control Software: G Code is not universal. Some commands may not work on you machine or may use a different code than you expected.