Functions are mathematical rules that relate inputs to outputs. They are used in mathematics to model real-world relationships and are represented by expressions, formulas, or equations. Functions have a domain, which are the inputs, and a range, which are the outputs.