You can’t reverse a hash. Hash algorithms have been designed to be irreversible. This is the main difference with ciphers, that can be reversed (it’s the decryption) with a key. Please note that I compare them for a better understanding, but they are not used in the same case and must not be confused.
But there is a way to get a plaintext back. The most basic method is a bruteforce in form of a hash table. It means that you will create an associative array with all possible values of a given length and from a given charset, let’s imagine 4 characters and a charset a-zA-Z0-9, you will hash all the strings from ‘aaaa’ to ‘9999’. As you can tell, this is very expensive in terms of computing because here it means that you have 624 possible hashes i.e. 14 776 336 hashes (number of characters in the charset power number of characters in the string). If you consider that a lot of websites will ask at least 8 characters, you have now 628 i.e. approximately 2.18340106e14 hashes. After this, you will check if the hash you have exists in your database and if it exists, you have the corresponding plaintext in your associative array.
You can also do hash tables based on a dictionary attack. This means that you will take a dictionary of a lot of common words, or combination of common words and some numbers before or after the common word (imagine the password is “sunshine42”), and hash all of these words. This will not “crack” all the strong passwords like “SQDJHfqd5dfs568-(&&_”, bit it will needs less computationnal power.
Then you have a technique named Rainbow Tables but this is too complicated to explain here, if it interests you here is the Wikipedia link, you can also search for specialized articles on the subject.