The context is the definition of Hecke Größencharakter:
http://en.wikipedia.org/wiki/Hecke_character
This is supposed to generalize the Dirichlet $L$-series for number fields. Dirichlet characters are characters of the multiplicative groups of $\mathbb Z/p\mathbb Z$. An appropriate generalization would be instead to consider characters of the multiplicative group of $\mathcal O_K/\cal P$ where $\mathcal P$ is a prime ideal in the ring of integers of a number field $K$.
But Hecke Größencharakter goes to more trouble than this. It brings in ideles and such for a more complicated generalization. Why is this necessary?