Sub programs are named PL/SQL blocks that can take parameters and be invoked. There are two types: procedures, which perform actions, and functions, which perform actions and return a value. Functions can be either local, defined in the declaration section, or stored directly in the Oracle engine.