For the select list, T-SQL scalar UDFs will execute once per row projected by the query, e.g. the final resulting row count, under… Every circumstance I’ve ever seen.
In SQL server. Of course.
Read on for situations like having the function execute more than once per query, using functions for predicate evaluation, etc.