It depends on your architecture and also the calling conventions used. In most cases, though, when a function calls another function, the return address is pushed onto the current thread's stack. So in the callee function you could analyze the stack to see what function called you.
Your callee function would have to know what address ranges correspond to what functions (and perhaps what line numbers of each function) in your program. Your function could parse its own symbol table to do this, for example.
Anyway, this technique is used a lot in debugging environments, whenever there is a "stack trace" or "back trace" function. Visual C++ does this. You can view the "call stack" in the debugger to see the chain of function calls. The debugger is merely analyzing the current thread's stack and figuring out what functions called what other functions.
By the way, not only can you see function call return addresses, but also any local variables the caller function has. Of course you'd have to know how many variables and their types beforehand. That sort of information is usually not contained on the stack itself.
All of this said, it is pretty unusual to want to do this in a function. Normally if a function is called you really shouldn't care what function called you.