Condensation can be a hassle, but it isn't necessarily harmful. If your phone camera has condensation on the inside of the lens it can be dried out without you needing to take apart your phone, but you should avoid using it until it has dried. If you're using your phone in a humid environment, or in cold temperatures, you can take preventative measures to help avoid moisture from getting in.
Video of the Day
Before anything else, turn off your phone -- moisture itself isn't harmful, but if there is enough of it, using your phone could cause it to short circuit. If you can remove your battery and SIM card, do so, but this is not necessary to proceed. To remove the moisture from your phone, set your phone in a small, sealed container or plastic bag along with a desiccant like silica gel packets. Alternatively, place your phone in a bag of rice, making sure that the phone is completely immersed in the rice. Leave it there for at least an hour; if you notice a lot of condensation in your phone, leave it there longer to be safe.
Condensation can occur often in humid environments, but also when it is very cold. In humid environments, you can offset its effects by keeping your phone in a case or backpack where it won't be exposed to the elements. For added effect, put silica gel packets into your case, if you are able to keep it dry. When taking your phone from one extreme condition to another -- such as walking into a warm building from the cold outdoors -- give your phone time to acclimate to the surrounding temperature before using it.