Let $k$ be a commutative ring.  Feel free to assume it's a field.

Let $X$ be a set.  This question is only interesting when $X$ is infinite.

Write $k^X$ for the $k$-algebra of functions $X \to k$, with the algebra operations defined pointwise.

> What are the $k$-algebra homomorphisms $k^X \to k$?  

Trivially, for each $x \in X$ there is a projection/evaluation map $k^X \to k$.  

> Under what circumstances are there any $k$-algebra homomorphisms $k^X \to k$ apart from the projections?

Here are some observations.  Observation 2 shows that the question is not entirely trivial, in the sense that there *are* sometimes nontrivial homomorphisms $k^X \to k$.

1. Any homomorphism $\Phi: k^X \to k$ gives rise to an ultrafilter $\mathcal{U}_\Phi$ on $X$, assuming that $k$ is an integral domain.  To see this, write $\chi_S \in k^X$ for the characteristic function of a subset $S \subseteq X$.  Since $\chi_S$ is idempotent, $\Phi(\chi_S)$ is also idempotent, and is therefore either $0$ or $1$.  Write
$$
\mathcal{U}_\Phi
=
\{ S \subseteq X : \Phi(\chi_S) = 1 \}.
$$
It's easy to check that $\mathcal{U}_\Phi$ is an ultrafilter on $X$ —  [in other words](https://mathoverflow.net/questions/69467/an-ultrafilter-is-a-set-of-subsets-containing-exactly-one-element-of-each-finite/129930), that whenever we write $X = X_1 \amalg \cdots \amalg X_n$, there is precisely one $i$ for which $\Phi(\chi_{X_i}) = 1$.

2. When $k$ is a *finite* integral domain — that is, a finite field — the $k$-algebra homomorphisms $k^X \to k$ are in bijection with the ultrafilters on $X$.  One direction of this correspondence is given as in (1).  

    For the other, start with an ultrafilter $\mathcal{U}$ on $X$.  We want to define a homomorphism $\Phi_{\mathcal{U}}: k^X \to k$, so take $\phi \in k^X$.  Since $k$ is finite, the fibres $(\phi^{-1}(c))_{c \in k}$ form a finite partition of $X$.  So there is precisely one element $c \in k$ such that $\phi^{-1}(c) \in \mathcal{U}$, and we put $\Phi_{\mathcal{U}}(\phi) = c$.  It's straightforward to check that $\Phi_{\mathcal{U}}$ is a homomorphism and that the processes $\mathcal{U} \mapsto \Phi_{\mathcal{U}}$ and $\Phi \mapsto \mathcal{U}_\Phi$ are mutually inverse.

3. When $X$ is finite and $k$ is an integral domain, the only homomorphisms $k^X \to k$ are the projections.  This follows e.g. from (1) and the fact that ultrafilters on a finite set are principal.

4. Denote by $X \cdot k$ the $k$-vector space with basis $X$.  Then $k^X$, as a $k$-vector space, is isomorphic to the space of linear maps $X \cdot k \to k$.  Now any $k$-algebra homomorphism $\Phi: k^X \to k$ is, in particular, a $k$-linear map, so $\Phi$ is an element of the double dual of $X \cdot k$.  Hence there can only be nontrivial homomorphisms $k^X \to k$ if there are nontrivial elements of the double dual of $X \cdot k$.  

    So my question seems to be closely related to one that's come up [a few times](https://mathoverflow.net/questions/49388) [here before](https://mathoverflow.net/questions/49351): how much Choice do we need in order to construct nontrivial elements of the double dual of an infinite-dimensional vector space?