What is the proper way to call a function (from functions.php) on a link click?

What is the proper way to call a function (from functions.php) on a link click?