What is the generalization of composition in abstract algebra (of rings and fields)?

You can require the existence of a composition operation $\circ$ on your field, thus creating a composition field. Any field may be considered as a composition field with the "trivial" composition $f\circ g=0$, or the "constant" composition $f\circ g=f$. For any interesting composition rules, however, you may have to consider more specialized fields. See more in the link provided by healynr.