Usually, logic refers to abiding by patterns of reasoning that can justify a position based on previously agreed upon positions.
Aristotle famously wrote down several laws of logic (non-contradiction, no middle third, etc), but he was quite far from giving a complete list of such laws.
Formal logic began much later with Boole, who did boolean logic. This is, in essence, what is known as propositional logic. it deals with words such as 'and', 'or', 'if...then..', 'not', 'if and only if'.
But Boolean logic doesn't deal with another couple of important phrases, 'there exists', and 'for every'. Adding these to the analysis leads to what is known as prepositional or quantifier logic.
There is yet another type, more controversial, known as modal logic, which deals with 'possible worlds'. So 'possible' and 'necessary' are key words for this type of logic. Unfortunately, while the basic rules for propositional and quantifier logic are agreed to and very clear, those for modal logic are debated still.
Then we get into the logic of equality and of collections of objects. This leads to modern mathematics, which is ultimately based on set theory. Here, the basic assumptions are generally agree upon, but it is KNOWN that they cannot be complete (even when limited to math).
Then, there are the non-standard logics. Three valued logic, paraconsistent logic, logics without the law of excluded middle, etc. All are *internally* consistent, but they can give very different results than classical logic. Fuzzy logic is a type of non-standard logic where, in essence, we assign probabilities to truth or falsity. Quantum logic is yet another variant.
One aspect is that NONE of these necessarily say anything about the real world. They ALL say how to go from one set of assumptions to conclusions based on those assumptions. But they do NOT say how to arrive at the original assumptions.
Questions concerning causality, time, matter, etc are NOT ultimately questions of logic. Something beyond logic is required for the assumptions upon which logic can work. This is the case for the rest of metaphysics as well.
Without assumptions that all can agree to, logic alone can go nowhere.