The syntax is
htpasswd -c passwdfile username
or
htpasswd -cb passwdfile username yourpassword
The default hash algorithm is MD5 since version 2.2.18 of apache (you can identify it by the $apr1$ prefix). Before that, the default hash was unix crypt, (without a prefix).
If your apache version is <2.2.18, you'd better force md5 with
htpasswd -cm passwdfile username
htpasswd -cbm passwdfile username yourpassword
Maybe after that you should check your passwdfile is correctly created (do you havec permissions etc).
When you generate an MD5 hash, with online tools or with the htpasswd command-line, it's different each time because it uses a random salt.