User-defined functions (UDFs) in SQL Server allow users to define custom functions that can accept parameters and return values. There are two main types of UDFs - table-valued functions that return results in a table that can be queried, and scalar-valued functions that return a single value. The document provides examples of creating both types of UDFs and using them to return sales data from a sample SalesHistory table based on input parameters.