Which algorithm?
APR1 is Apache's salted MD5 ($apr1$…) — the classic, widely supported htpasswd format, and the one nginx accepts too. SHA-1 ({SHA}…) is unsalted base64 SHA-1; simple but weaker. For new setups prefer bcrypt where your server supports it.
How to use
Copy the line into your .htpasswd file (one user per line), and point your server's basic-auth config at that file.
Privacy
Hashing runs locally; the username and password are never uploaded.