An ordinary generating function is a formal power series used to encode sequences of numbers, providing a powerful tool for solving combinatorial problems and analyzing sequences. It transforms a sequence into a function, allowing operations on sequences to be performed algebraically and facilitating the derivation of closed-form expressions or recurrence relations.