How Authentication in wordpress works? wp_authenticate_username_password()

This is the line you’re looking for:

$userdata = get_user_by('login', $username);

The get_user_by function calls WP_User::get_data_by and that function eventually executes this SQL:

SELECT * FROM $wpdb->users WHERE user_login = $username

The hashed password will be contained in the results of that query. Eventually, the wp_check_password function will be called to compare the hashes.