Before creating the program, we need to know first about the coordinate system.
Coordinate system explain the work areas of the workpiece.
Coordinate system is chosen based on the machine type.
Coordinate system seen from the location of the machine spindle.
Where the axis of the machine that attached Spindle,
that is what determines where the selected coordinate system.
There are three types of coordinate systems, there are G17, G18, G19.
Can be seen in the picture below.
G 17 X-Y PLANE, for vertical mill machine
G 18 X-Z PLANE, for the horizontal milling machine
G 19 Y-Z PLANE, for the horizontal milling machine
vertical Milling machine
Horizontal milling machine
This video shows a horizontal milling machine runs