It sounds like you have laryngitis! This is a very common inflammation of the voice box, and it commonly occurs after a cold virus or flu infection. The sensation of losing your voice or going hoarse comes from having some inflammation in the vocal cords. In addition to laryngitis with a viral infection, the other common cause of laryngitis is mechanical stress on the vocal cords (this is why singers sometimes complain of being hoarse).
Having laryngitis like this is not a sign of a more serious medical problem. Generally, the inflammation will get better over a period of days to weeks. You do not need to take antibiotics usually. The principle treatments for laryngitis include rest, drinking lots of fluids, and taking over the counter medications for inflammation and pain, such as tylenol or ibuprofen.
You should go see your doctor
if you are having high fevers, trouble keeping down liquids, severe headache
, trouble breathing, or any other serious symptoms. Otherwise, you should be expecting to start feeling better soon. The typical viral infection will run its course in 7 to 10 days. As always, check in with your primary care doctor
for more specific information!