You are correct in your understanding of the new password, it is generated the stored in the db. The user gets the original unencrypted value sent to them in the email.
So when you are adding the user you can have the password that was entered stored in a session variable, then when the user is inserted you would send out the email to the user with their details. For the password you would use the unencrypted version held in the session variable.
In order for the user to change their password they would either need to be logged in already, or go to a forgot password page that will generate a new random password and email it to the user.
If you store the passwords in an encrypted format you will not have the ability to email the password to the user, you would need a forgot password page that resets the user's password to a random value and emails them with that.