It might help to go back to the definition of Hecke operators in level $1$ in Serre's Course in arithmetic. For a prime $p$ and a lattice $\Lambda$, the $p$the Hecke corresondence (I forget if Serre uses exactly this terminology) takes
$\Lambda$ to $\sum \Lambda'$, where $\Lambda'$ runs over all index $p$ sublattices of $\Lambda$.
This is a multi-valued function from lattices to lattices (it is $1$-to-$p+1$-valued).
Now lattices (mod scaling) are just elliptic curves: $\Lambda \mapsto \mathbb C/\lambda$. And so we can also think of this as a multi-valued map from the moduli space of ellitic curves (i.e. the $j$-line, or $Y_0(1)$ if you like) to itself.
How to describe a multi-valued map more geometrically? Think about its graph
inside $Y_0(1) \times Y_0(1)$. The graph of a function has the property
that its projection onto the first factor is an isomorphism. The graph of a $p+1$-valued function has the property that its projection onto the first
factor is of degree $p+1$.
This graph has an explicit description: it is just $Y_0(p)$ (the modular curve
of level $\Gamma_0(p)$). Remember that $Y_0(p)$ parameterizes pairs $(E,E')$ of $p$-isogenous curves. We embed it into $Y_0(1) \times Y_0(1)$ in the obvious way, by mapping the pair $(E,E')$ (thought of as an element of $Y_0(p)$) to $(E,E')$ (thought of as an element of the product).
In terms of the upper half-plane variable $\tau$, one can think of this map as
being $\tau \bmod \Gamma_0(p)$ maps to $\bigl(\tau \bmod SL_2(\mathbb Z), p\tau
\bmod SL_2(\mathbb Z) \bigr).$
So we have recast Serre's description of the $p$th Hecke operator in terms of a correspondence on lattices in the geometric language of correspondences on curves: i.e. the $p$th Hecke operator is given by a mutli-valued morphism
from $Y_0(1)$ to itself, rigorously encoded by its graph thought of as a curve
in the product surface $Y_0(1) \times Y_0(1)$, which is in fact isomorphic to
$Y_0(p)$.
We can easily compactify the situation, to get $X_0(p)$ embedding as the graph
of a correspondence on $X_0(1) \times X_0(1)$.
[Caveat: Actually the map $Y_0(p) \to Y_0(1) \times Y_0(1)$ need not be an embedding; it is a birational map onto its image, but the image can be singular
(and the same applied with $X$'s instead of $Y$'s). This is because the point on $Y_0(p)$ is not just the pair $(E,E')$, but the additional data of the $p$-isogeny $E\to E'$, which is not uniquely determined up to isomorphism in some
exceptional cases. But this is a technical point which is not worth fussing about at the beginning.]
The advantage of having a geometric correspondence in sight is that whenever
we apply any kind of linearization functor to our curve, the correspondence will turn into a genuine single valued operator.
The point is that if we have a multi-valued function from one abelian group to another, we can just add up the values to get a single-valued function.
So the correspondence $T_p$ induces genuine maps from the Jacobian of $X_0(1)$ to itself, or from the cohomology of $X_0(1)$ to itself, or from the space of holomorphic differentials on $X_0(1)$ to itself.
Now actually in the case of $X_0(1)$, which has genus zero, the Jacobian and the space of holomorphic differentials are trivial. But we can do everything with $X_0(N)$ or $X_1(N)$ in place of $X_0(1)$ for any $N$, and all the same remarks apply.
Remembering that the holomorphic differentials on $X_0(N)$ are the weight two cuspforms of level $N$, one can compute that the $p$th Hecke correspondence gives rise to the usual $p$th Hecke operator on cuspforms in this way.
What's the point of considering the correspondence? There are many; here's one:
if we reduce everything mod $p$, we get a mod $p$ correspondence on the mod $p$ reduction of $X_0(N)$, whose graph is the mod $p$ reduction of $X_0(Np)$. But this latter reduction is well-known to be singular, and in fact reducible; it is the union of two copies of $X_0(N)$. Thus the $p$th Hecke correspondence mod $p$ decomposes as the sum of two simpler correspondences, which one checks to be the Frobenius morphism from $X_0(N)$ Mod $p$ to iself, and its dual.
This is the Eichler--Shimura congruence relation (in some form it actually goes back to Kronecker), and it underlies the relationship between $T_p$-eigenvalues and the trace of Frobenius in the $2$-dimensional Galois reps. attached to Hecke eigenforms.
Some MO posts which are vaguely relevant:
The map on differentials induced by a correspondence
The Eichler --Shimura relation
A bit of information, though (as @Kimball comments) you are asking a very broad question... :
As you seem to be aware, the equivalence between smooth repns of p-adic groups and repns of the (full) Hecke algebra is not hard to prove. Ok. In particular, irreducibles of one are irreducibles of the other.
In contrast, formulating the archimedean analogue is not so easy to do in a manner that captures what we want, either for the local repn theory, or for its applications to automorphic forms. One difference is that there are differential operators in the archimedean case, while in the p-adic case there's nothing "transverse to support". At the same time, sure, test functions, or $K$-finite test functions, on the group do act, and really give all the information we truly need. But this needs a group action, and in the archimedean case the group action wrecks $K$-finiteness. For other reasons as well, as Harish-Chandra discovered, we sometimes prefer $\mathfrak g,K$ modules to $G$-modules. The differentiation action of the universal enveloping algebra is the same as "convolution" action of distributions supported at the identity. We also want to be able to talk about the $K$ action, and the smallest associative algebra containing both is indeed the algebra of $K$-finite distributions supported on $K$. Some little theorems in analysis are probably necessary to make this absolutely clear.
Perhaps annoyingly, for a person who has invested lots of energy in understanding such things, it seems that we rarely refer to this for any purpose, in practice. That is, that attempt at some sort of unifying formalism seems to have more an aesthetic goal than a utilitarian one. To talk about "automorphic repns" usually is a very small distance away from assuming that $\pi$ is an irreducible ... afc repn". So the various equivalent ways of talking about larger repns do not necessarily arise.
Yes, there is the issue of recovering the $G$-repns from $\mathfrak g,K$-repns, called "globalization". There is a range of "globalizations", discussed (independently) by Casselman and Wallach. This is a pretty tricky business, in my opinion.
The number-theoretically significant issue of expressing a fairly arbitrary (generalized?) function on $G_k\backslash G_{\mathbb A}$, or similar, is much more complicated than those set-up, aesthetic issues. E.g., in the simplest possible case, Fourier series on a circle, pointwise convergence is already subtle, not to mention Fourier series of distributions, Sobolev inequalities, and so on.
To recapitulate: I have the impression that those definitions are not too much in peoples' minds while doing actual work in automorphic forms. Either people say "let $\pi$ be an irreducible afc repn", or assume that spectral decompositions of "Poincare series" really do work as well as they hope. :) (In any case, until we see an interesting outcome, there's not so much interest in worry about filling in technical details. After all, for automorphic forms, in contrast to Fourier series on the circle, giving reasonable sup-norm estimates on eigenfunctions for the Laplacian is highly non-trivial already! A rough foundational situation! :)s
Best Answer
Both are used and they are basically equivalent. What I'm going to say is technically incorrect in some details but the general idea is right.
To make life easy, assume $f$ is a modular cusp form for $\operatorname{SL}_2(\mathbb Z)$ which is a normalized eigenfunction of all Hecke operators $T_p$. There is a way (actually several, slightly inequivalent ways) to associate $f$ to an automorphic form $\phi: \operatorname{GL}_2(\mathbb Q) \backslash \operatorname{GL}_2(\mathbb A) \rightarrow \mathbb C$. Let $G = \operatorname{GL}_2$. The function $\phi$ lives inside the space $L^2(G(\mathbb Q)Z_G(\mathbb A) \backslash G(\mathbb A))$ and generates an irreducible representation $\Pi$ inside there.
Let $G_p = G(\mathbb Q_p)$ and $K_p = G(\mathbb Z_p)$. There are unique irreducible, admissible representations $\pi_p$ of $G_p$ and a representation $\pi_{\infty}$ of $G_{\infty} = G(\mathbb R)$ such that $\Pi$ contains the "infinite tensor product" representation $\otimes_{p \leq \infty} \pi_p$ as a dense subspace (some work needs to be done to make sense out of an infinite tensor product). Assume each representation $\pi_p$ of $G_p$ has a nonzero vector fixed by $K_p$.
Let $H_p = \mathscr C_c^{\infty}(K_p \backslash G_p/K_p)$ be the convolution ring of locally constant and left and right bi-$K_p$ invariant complex valued functions on $G_p$. This is one of the kinds of Hecke algebras you were considering. These particular Hecke algebras turn out to be commutative rings with unity. Let $H_{\operatorname{fin}}$ be the infinite tensor product of the rings $H_p : p < \infty$.
The function $\phi$ lies in $\otimes_{p \leq \infty} \pi_p$ and in fact is itself equal to an infinite tensor product $\phi = \otimes_{p \leq \infty} \phi_p$ with $\phi_p \in \pi_p$. The Hecke operators $T_{p^n} : n \in \mathbb N$ scale the cusp form $f$, but if we identify $f$ with the automorphic form $\phi$, then the $T_{p^n}$ affect only the component $\phi_p$. In fact, $T_{p^n}$ identifies with a certain element in $H_p$, and $H_p$ is generated as an algebra by the $T_{p^n}$.
In this way, the tensor product of the "local Hecke algebras" $H_p$ form the "global finite Hecke algebra" $H_{\operatorname{fin}}$, which can also be thought of as being generated by the operators $T_{p^n}$, for $p$ prime and $n\in \mathbb N$.