Logic is, first and foremost, a branch of knowledge coming out of philosophy. It deals with any sort of thinking using reasoning to deduce the validity of vertain statements. For example, if one were to say A is greater than B and B is greater than C. Then, one could conclude via logic that A is greater than C. Logic with reference to mathematics refers to either applying logic to mathematical fields or applying mathematical theory to logic. Mathematical logic is then divided into four topics: set theory, proof theory, recursion theory, and model theory.
Set theory is the mathetmatical study of sets which are abstract collections of objects. An example would be the set of integers. Two of the most important concepts out of set theory are the axiom of choice and the continuum hypothesis. Proof theory takes proofs as an anstract object of mathematics and considers various analysis of them. Recursion theory is typically concerned with the links to computability, reducibility, and degrees of structure. Model theory studies the way other formal theories are modelled; that is to say how formal theories are structured in mathematics.