procedure

A set of instructions that work as a unit; a subroutine. See also function.