No. This answer assumes that the question intends the standard definition of an algebraic set, which is the zero locus in $\mathbb{R}^n$ of a set of real polynomials. Let $f(x,y)$ be an irreducible polynomial whose zero locus $C$ is bounded and has two components. For example, take, $y^2 + (x+2)(x+1)(x-1)(x-2)$. Let $h(x,y)$ be a polynomial which is positive on one component of $C$ and negative on the other; in the example, we could take $h(x,y)=x$. Then take $$M = \{ (x,y,z) : f(x,y)=0,\ h(x,y) = z^2 \}.$$ Then $M$ is compact and algebraic, but the projection of $M$ onto the $(x,y)$-plane is only one of the two components of $C$. Here is a drawing of the curve $C$ in the example: [![enter image description here][1]][1] This is why real algebraic geometry mostly studies semialgebraic sets, which are defined by polynomial inequalities; the class of semialgebraic sets IS closed under projection. [1]: https://i.sstatic.net/Y3VjI.png