Recall sometimes authors do not present the content sequentially, or they suppose the reader is already familiarized with it.
Given $p$, the definition of $L_p(X)$ depends on three objects:
- The set $X$,
- The $\sigma$-algebra of subsets of it, $\mathcal{X}$ and
- The measure $\mu$ defined for all elements of $\mathcal{X}$.
I recommend "The Elements of Integration and Lebesgue Measure" book from Robert T. Bartle, Chapter 6.
Thus, given $\mathbb{T}^n$ as a pure set, first an algebra of subsets $\mathcal{X}$ must be defined; usually I have seen Borel $\sigma$-algebra of subsets, and then a measure over it, usually Lebesgue measure. Finally, given the functions with domain $\mathbb{T}^n$ and codomain $X$, measurable functions are defined as in Chapter 5 of the same book, and for this set functions an equivalence relation is defined such that we say two functions are related if and only if they have the same value in all its domain $\mathbb{T}^n$ except a subset of measure zero. With the $p$-norm, $L_p(\mathbb{T}^n)$ is the set of equivalence classes of measurable functions with domain $\mathbb{T}^n$ that are the same almost everywhere.
For instance, one-dimensional thorus $\mathbb{T}^1$ can be regarded as an interval or as $\mathbb{R}$ modulo some interval. Any measure over an interval can be chosen for defining classes of almost-everywhere-equal functions with domain on it. $\mathbb{T}^n$ can be seen as $\mathbb{R}^n$ modulo some hypercube.