Typical stylesheets make Mathematica automatically organize notebook cells into convenient groups. You can override this behavior, or control it in any way, using menu items, option settings, or from within a program.
Group Cells (Ctrl+G) — group together selected cells
Ungroup Cells (Ctrl+U) — ungroup selected cells
CellGrouping — whether to do automatic grouping of cells in a notebook
CellGroupingRules — precedence and grouping type for cells
ShowGroupOpener — whether to control cell groups with
CellGroup — symbolic representation of a cell group within a notebook expression