The function itself is not related to a specific database or environment where the PHP script is executed. It just creates a hash string from an input string. It is up to you to define what to do with the returned string.
You can store it in a database like any other string and query it later to pass it together with the plain password to
PHP: password_verify - Manual[
^] for verification.