A function signature defines the input and output interface of a function, specifying the number and types of its parameters and the type of its return value. It serves as a contract that ensures consistent usage and understanding of the function's behavior in a codebase.