We know that the generalized classifying space / Eilenberg–MacLane space $$ B\mathbb{Z}_2=\mathbb{RP}^{\infty} $$ $$ BU(1)=\mathbb{CP}^{\infty} $$
How do one construct/derive the (infinite dimensional) space explicitly: $$ B^n \mathbb{Z}_2=K(\mathbb{Z}_2,n)=? $$
How do one construct/derive, when $p$ is a prime: $$ B^n \mathbb{Z}_p=K(\mathbb{Z}_p,n)=? $$
Can one explain $B\mathbb{Z}_2$, $B^2 \mathbb{Z}_2=K(\mathbb{Z}_2,2)$, $B^n \mathbb{Z}_2=K(\mathbb{Z}_2,n)$, $B^n \mathbb{Z}_p=K(\mathbb{Z}_p,n)$, in a unified consistent but also intuitive way?
For an abelian group $A$ with a discrete topology we have
$$K(A,0)\simeq A,\qquad K(A,1)\simeq BA.$$
Note the homotopy equivalences rather than equalities. We can model $BA$ by using a bar construction to get a contractible free $A$-space $EA$, and then set $BA=(EA)/A$. I detailed this in an answer here Classifying space $B$SU(n).
One finds that the bar construction model for $EA$ is a topological monoid (that is, they carry an associative, unital product), and in the case that $A$ is abelian, this product descends to make $BA$ into a topological monoid. Hence the bar construction may be applied again to generate a contractible free $BA$-space $E(BA)$, whose $BA$ quotient is a classifying space $B(BA)=B^2A=E(BA)/BA$.
Since the projection $EBA\rightarrow B^2A$ is fibration with contractible total space and fibre $BA\simeq K(A,1)$ we study the long exact homotopy sequence to get
$$\pi_i(B^2A)\cong \pi_{i-1}(BA)$$
In particular, if $BA$ is a $K(A,1)$, then $B^2A$ is a $K(A,2)$.
Now for the same reasons as before $B^2A$ has a classifying space $B^3A\simeq K(A,3)$, and we can proceed by induction we get
$$K(A,n)=B^nA.$$
In general we have no nice way to model $K(A,n)$ except for basically the few cases you outline in the question. A useful fact is that
$$K(A\oplus B,n)\simeq K(A,n)\times K(B,n)$$
so one can apply the theorem on the classification of abelian groups to decompose things into easier to work with factors. Another useful fact is that if $A\rightarrow B$ is a homomorphism then there is an induced map $K(A,n)\rightarrow K(B,n)$, and in particular if $0\rightarrow A\xrightarrow{f} B\xrightarrow{g} C\rightarrow 0$ is short exact then there is a fibration sequence
$$\dots\rightarrow K(C,n-1)\rightarrow K(A,n)\xrightarrow{Kf} K(B,n)\xrightarrow{Kg} K(C,n)\rightarrow K(A,n+1)\rightarrow\dots$$
And this can be useful. For example $0\rightarrow \mathbb{Z}\xrightarrow{\times 2}\mathbb{Z}\rightarrow \mathbb{Z}_2\rightarrow 0$ gives us
$$\dots\rightarrow S^1\rightarrow \mathbb{R}P^\infty\rightarrow \mathbb{C}P^\infty\xrightarrow{\times 2} \mathbb{C}P^\infty\rightarrow K(\mathbb{Z}_2,2)\rightarrow\dots$$