As explained in the comments, if $k$ is a field, then $k$-algebra homomorphisms $k^X\to k$ are in bijection with $|k|^+$-complete ultrafilters on $X$ (that is, ultrafilters closed under $|k|$-fold intersections, or equivalently, ultrafilters such that whenever you partition $X$ into $|k|$ pieces one of the pieces must be in the ultrafilter).  In particular, they are all projections unless (and only unless) there is a measurable cardinal $\kappa$ such that $|k|<\kappa\leq |X|$ (here I count $\aleph_0$ as measurable), since the least cardinal that supports a $|k|^+$-complete ultrafilter is measurable.  When $k$ is not a field, the question seems harder.