Where do funtions live?

At runtime

During program execution functions live in the text segment of a program which is immutable. Each function has an address just like a data variable but in a different segment. The function name is only an alias for programmers. Internally functions are known only by their address.

At compile time

When code is compiled (see below) the code statements are usually collected in archives (libraries). If a program needs a function, the proper library is "linked" to the program and it learns about the address of the function. The address is at runtime used to call the function.