To get rid of a cold in 24 hours, it is recommended to rest, stay hydrated, and use over-the-counter medications to alleviate symptoms such as nasal congestion, headache, and sore throat.