If the UDF is properly hooked-up in the setup of your case and if the required C-compiler is available in the system and properly setup, then ANSYS Fluent will compile the UDF automatically when the CAS is read into Fluent or if the Fluent simulation is run in batch mode.