"Doubt does not remove certainty." اليقين لا يزول بالشك
This principle of Fiqh is consistent with what Allah said in the Qur'an: "Indeed assumption avails not against the truth at all." Its implication is that if we have established certainty about a matter, this certainty should not be eliminated by any doubt that is raised subsequently. The following examples show how the principle is applied.
If a person is missing and we're not sure whether he's still alive or not, we should consider him to be alive until we have a proof that he's dead. This is because the fact (he's alive) precedes the uncertainty (he may be dead).
A person who performs a perfect wudu (ablution) and later becomes unsure about whether he broke his wudu or not is considered to still have a valid wudu. But if the uncertainty is about the integrity of the wudu (e.g., he's not sure if he washed his face), then his wudu becomes invalid. This is because the initially established fact is perfect wudu in the first case and the need for wudu in the second case.
The fast of a person who breaks his fast while unsure about the time of sunset is invalid if he later finds out that his assumption was wrong. But the fast of one who wakes up and eats while unsure about the time of fajr is valid even if he finds out that his assumption was wrong. The reason is that the initial fact is daytime (when it's not okay to eat) in the first case and night time (when it's okay to eat) in the second case.
This important principle encompasses many rules of jurisprudence, including the famous "Innocent until proven guilty."