I'm reading a book on Mathematical Logic (on my own) and from the beginning there are terms such as "functions" and "relations", but the only definitions of these words that I know are in terms of sets, but the purpose of mathematical logic is (among others) to be able to construct an axiomatic theory of sets. How is that not a circular construction ?
The "construction" is circular, the reasoning ... not necessarily.
When you write a book about the syntax of (e.g.) english language, you use the language itself.
This "procedure" works because you have already learnt how to speak and read.
In mathematics you use the language of set (but also arithmetic : is very difficult to speak of "objects" without being able to count them ...) to set up your theory.
The same in mathematical logic that is a branch of mathematics: you need set language for describing basic objects like symbols (we need a set of primitive ones), formula (a string, i.e.a set of symbols), derivation (a sequence, i.e.a set of formulas), etc.
The "trick" is the interplay between the (mathematical) language you are "speaking of" (the english language subject to the study in your syntax book) and the (mathematical) language you are "speaking with" (the english language with which your syntax book is written).
The first we call it : object language.
The second we call it : metalanguage.