Consider the example 1.3.2 (xi) of Emily Riehl (2016) Category theory in context:
I am having trouble trying to understand the part where $M^f$ is described. As far as I have understood,
$M^f:M\times\overset{m}{\ldots}\times M \longrightarrow M\times\overset{n}{\ldots}\times M$ and $M^f=(M^f_1,\ldots,M^f_n)$ where $M^f_i:M^m \longrightarrow M$.
What I do not understand is how $M^f_i$, being a component of $M^f$, can project to coordinates other than $i$. Am I not understanding the meaning of components in this context?
I canont understand when to multiply the elements in $f^-1(i)$ using the commutative monoid structure. Are they multiplied to obtain the coordinate index? Or after obtaining the coordinate index? (This question might not make sense given that I do not understand the prevous question about function components)

Let $\pi_j:M^m\to M$ be the $j$th projection map. Then $M^f_i(x)$ is defined as the product of the elements $\pi_j(x)\in M$ where $j$ runs over all the elements of $f^{-1}(i)$.
An explicit example may help clarify any confusion you may have. Let us write $n_+$ explicitly as $\{0,1,\dots,n\}$, where $0$ is the basepoint. Consider the function $f:5_+\to 2_+$ given by $$f(0)=0,f(1)=2,f(2)=2,f(3)=1,f(4)=2,f(5)=1.$$ Then $M^f$ is the map $M^5\to M^2$ given by $$f(x_1,x_2,x_3,x_4,x_5)=(x_3x_5,x_1x_2x_4).$$ The first coordinate is $x_3x_5$ because $3$ and $5$ are the indices that $f$ maps to $1$, and the second coordinate is $x_1x_2x_4$ because $1,2,$ and $4$ are the indices that $f$ maps to $2$.