What is the Difference between directly call a function and call a function using add_action?

In the first block of code, pp_submit__link_form() will be fired on the init action in WordPress.

In the second block of code, pp_submit__link_form() will be fired immediately at the time the function is called.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)