User-defined functions in SAP HANA accept parameters, perform actions such as complex calculations, and return the results. There are two types of user-defined functions: scalar and table. Scalar functions return a single value and allow only expressions, while table functions always return a table, can accept table parameters, and are read-only. Table functions are defined using SQL Script and can only contain read-only statements.