What does mathematical logic mean?
In the book Analysis 1 by Terence Tao, it says:
The purpose of this appendix is to give a quick introduction to mathematical logic, which is the language one uses to conduct rigourous mathematical proofs.
Checking Wikipedia:
Mathematical logic is often divided into the fields of set theory, model theory, recursion theory, and proof theory.
This seems like a completely different definition. Why, for example, is set theory considered part of logic?
Logic is generally understood to be the study of sound reasoning. Mathematical logic in the sense Tao uses this word is the kind of logic one uses when doing mathematics. This includes dealing with logical connectives (such as "and", "or", "if", and "if and only if"), quantifiers ("for all" and "exists"), variables, and proofs.
But, as it sometimes happens in natural languages, one and the same word can have two (or more) different (though sometimes related) meanings. This might be the cause of your confusion. In fact, mathematical logic can also mean the branch of mathematics that deals with formulae, theories, proofs, models, … as mathematical objects. Of course, as all other branches of mathematics do, this branch of mathematics also uses mathematical logic in the former sense.
The reason why some people regard set theory as a subfield of mathematical logic$^*$ in the latter sense is that these fields are historically quite related. You may be interested to learn about the foundational crisis. I found a talk given by mathematician Chaitin that gives a good overview over this topic: see Part 1, Part 2, Part 3, Part 4.
By the way, the appendix on logic is included in the sample chapters of Tao's book.
$^*$ But at the end of the day this is just a termininological convention.
EDIT: This answer is just a restatement of Henry's comment: