Short of giving a whole lecture course on harmonic analysis, I can only scratch the surface of this topic.

The basic fact is that if G is any locally compact abelian group, the space of characters on G can also be made into a locally compact abelian group, called the dual group of G and usually denoted by $\displaystyle \hat{G}$. The dual of the circle group $\displaystyle \mathbb{T}$ is $\displaystyle \mathbb{Z}$, the group of integers. The dual of the real numbers is again the real numbers. The dual of $\displaystyle \mathbb{T}^n$ is $\displaystyle \mathbb{Z}^n$ and the dual of $\displaystyle \mathbb{R}^n$ is $\displaystyle \mathbb{R}^n$. In general, the dual of a compact group is a discrete group.

Every locally compact abelian group has an integral (called the Haar integral) associated with it, and every real- or complex-valued integrable function on the group has a "generalised Fourier transform." This is a continuous function on the dual group, defined by $\displaystyle \hat{f}(\xi) = \int_Gf(x)\xi(x)\,dx$, where $\displaystyle \xi(x)$ denotes the value of the character ξ at the element x of the group.

Since the dual group is also locally compact, it has its own dual, which turns out to be isomorphic to the original group (that's the Pontyagin duality theorem). There is a "Fourier inversion theorem" which says that, for a suitable class of functions, there is an inverse transform that reconstructs a function f on G from its Fourier transform $\displaystyle \hat{f}$ on the dual group.