How to hook a custom user function to a wordpress core ajax action?

How to hook a custom user function to a wordpress core ajax action?