User Exits are subroutines.
In the earlier days for writing code inside a user exit, customer needed to register that object with SAP to obtain an access key and then write their own logic inside that subroutine, however this is not the case now.
Customer Exits are function modules with a custom include inside them.