Indenting code refers to adding spaces or tabs at the beginning of each line within a block of code, typically done with nested structures like loops or conditional statements. It improves readability by visually showing which lines belong to which block.