In C you use function pointers [function-pointer.org]
In C# and the other .NET languages, you use delegates
In C++ and Java you usually work by inheriting from an interface