Logic is comprised of two types: deductive and inductive.
Deductive logic is the process where a set of premises lead to a deduced conclusion. Deductive logic works on taking already known facts, and deducing based on those facts what the outcome will be. A famous example of the deductive process is the detective Sherlock Holmes, who would see a collection of facts and deduce the perpetrator based on those facts.
Inductive logic is the most common form of logic and is practised throughout the animal kingdom. It is the logic of observation or interaction. If the sun rose today and yesterday it will probably rise tomorrow. If I drop a stone off a cliff it falls to the ground, if I drop off the cliff I will also fall to the ground. Induction is the process where an event has happened, or a conclusion is made in the mind, and base principles are derived from it.
Care needs to be taken with both forms of logic. Correlation is not causation; just because a series of events happens simultaneously does not necessarily mean that they are caused by other events around them. We may make conclusions based on the evidence presented that are valid, but they turn out incorrect. Up until the 1800s it was thought that all swans were white until the black swans of the southern hemisphere were discovered. There are also many advanced forms of logic, the study of logic has entertained philosophers for centuries, but the principles of deductive and inductive reasoning remain the same.