KiCAD treats graphic figures (lines, circles, etc) on the “Edge.Cuts” layer as the physical edge of the board. The copper fill algorithm will stop filling a filled zone when it reaches a figure on Edge.Cuts. The most recent push-and-shove router will not let a trace cross a line on Edge.Cuts. (Or so I have been told - earlier versions of P&S didn’t always honor edge cuts.)
Edge.Cuts is intended to satisfy a board manufacturer’s requirement to define the physical outline of a board. Some will ask for the Edge.Cut to be shown on Gerber files for EVERY layer; others will ask for the Edge.Cut to appear ONLY in a separate file, all by itself. (The KiCAD “Plot” menu has options that support both of these approaches.) Some board fabricators want to have all internal cutouts, slots, etc, defined on Edge.Cuts; others may want this information in a separate file.
The KiCAD “Margin” is a technical layer without a precise definition. (I want to say it’s not really defined at all, but that may not be entirely true.) Once upon a time it may have been intended to define the required set-back area from the board’s physical edge, where component outlines and/or traces are not allowed. As far as I can tell, this was never implemented and DRC seems to be totally ignorant of anything on the Margin layer. Consequently the layer is available for whatever you’d like to use it for. If you want to honor the original intent of Margin, you can use it to indicate the limits which component outlines should not cross, but you’ll have to enforce this by visual inspection - DRC will not flag any violations.
(I sometimes import a *.DXF file of my enclosure into the “Margin” layer, perhaps showing the locations of things like switches, the power cord entry, screw bosses used to hold the enclosure together, etc. This helps me visualize how my board design fits into the enclosure assembly.)
A Slick Trick: There are almost always set-back requirements related to the board edge. The board fabricator won’t put copper features (pads or traces) too close to the edge. Usually, the set-back requirement is greater than the minimum copper-to-copper spacing. KiCAD’s DRC doesn’t check for set-back per se.
But DRC (as well as the zone filling algorithm) treat a graphic line on Edge.Cuts as if it was a trace. That means they will enforce your specified spacing requirements around the Edge.Cuts line. So if your board has a general copper-to-copper spacing of, say, 10 mils but you need to maintain 25 mils of board-edge setback, then specify the graphic lines on Edge.Cuts as 30 mils wide. The fabricator (at least, any board fabricator I’ve dealt with in the last 15 years) will mill the board outline to the CENTER of the Edge.Cuts line. Half of the line width (15 mils in this example) will be inside the board edge. DRC (and the fill algorithm) will enforce another 10 mils of spacing between the Edge.Cuts line and any copper features, for a total of 25 mils between the physical board edge and any copper features.
Dale