A scalar UDF can appear almost anywhere a standard SQL scalar function can appear and an aggregate UDF can appear almost anywhere a standard SQL aggregate function can appear.
A table function can only appear in the FROM clause of an SQL SELECT statement. The SELECT statement containing the table function can appear as a subquery.