Take a plaintext user password, hash it with the same algorithm, and compare the just created hash with the hash stored in the database. If both hashes are the same, the user enters the correct password.
Update
Each time you use fresh random salt, thousand, leading to different hashes. Just create a new column in your database containing salt and grab it.
It is not a security issue to save salt with a hash. Salt will prohibit the simple use of pre-calculated rainbow tables for a single hash algorithm if it is used directly. It does not give any information about the real password that was used, nor about how the salt is combined with the plaintext password (preend, append, inter-weaved, ...), so it can be safely stored as follows to the generated one hash.
source share