A grid is the invisible arrangement of columns, rows and margins that organises the placement of elements on a page, screen or spread – the foundation of coherent, readable composition.
The grid answers the question "why does this layout look professional, though I can't say why": elements aligned to shared lines create an order we feel before we notice it.
In web design the 12-column grid is the standard, dividing flexibly into halves, thirds and quarters; in print, grids can be more complex (modules, baseline grids). Responsive design is essentially the set of rules by which a grid rearranges itself between a phone and a monitor.
Breaking the grid deliberately is a tool too – an element that escapes the order draws the eye. But to break something, you first need to have it.