A question about add_action()

The emailer::send is the function callback for a publish_post action hook. This action hook accepts only one parameter which is the post ID and it is passed by WordPress.

When you define an action hook, you set what parameters are passed to the callback functions. For example:

$arg_1 = "The aregument value";
do_action( 'my_custom_action', $arg_1 );

Every time you hook into my_custom_action, the $arg_1 value is passed to the function callback automatically.

add_action( 'my_custom_action', 'my_custom_action_callback' );
function my_custom_action_callback( $arg_1 ) {
    //Do whatever
}

In the example you are talking about, the publish_post action hook is is used. This action hook accept one argument, the post ID, and this argumente is passed to emailer:send automatically by WordPress.