For a finite involutive non-degenerate solution (X, r) of the Yang-Baxter equation it is known that the structure monoid M (X, r) is a monoid of I-type, and the structure algebra K[M (X, r)] over a field K shares many properties with commutative polynomial algebras, in particular, it is a Noetherian PI-domain that has finite Gelfand-Kirillov dimension. In this paper we deal with arbitrary finite (left) non-degenerate solutions. Although the structure of both the monoid M (X, r) and the algebra K[M (X, r)] is much more complicated than in the involutive case, we provide some deep insights.In this general context, using a realization of Lebed and Vendramin of M (X, r) as a regular submonoid in the semidirect product A(X, r) Sym(X), where A(X, r) is the structure monoid of the rack solution associated to (X, r), we prove that the structure algebra K[M (X, r)] is a module-finite normal extension of a commutative affine subalgebra. In particular, K[M (X, r)] is a Noetherian PI-algebra of finite Gelfand-Kirillov dimension bounded by |X|. We also characterize, in ring-theoretical terms of K[M (X, r)], when (X, r) is an involutive solution. This characterization provides, in particular, a positive answer to the Gateva-Ivanova conjecture concerning cancellativity of M (X, r).These results allow us to control the prime spectrum of the algebra K[M (X, r)] and to describe the Jacobson radical and prime radical of K[M (X, r)]. Finally, we give a matrix-type representation of the algebra K[M (X, r)]/P for each prime ideal P of K[M (X, r)]. As a consequence, we show that if K[M (X, r)] is semiprime then there exist finitely many finitely generated abelian-by-finite groups, G 1 , . . . , Gm, each being the group of quotients of a cancellative subsemigroup of M (X, r) such that the algebra, a direct product of matrix algebras. Vendramin [33] studied the structure group G(X, r) for arbitrary finite bijective non-degenerate solutions (i.e., not necessarily involutive). In [33,35,47] they associate, via a bijective 1-cocycle, to the structure group G(X, r) the structure group G(X, r ) of the structure rack (X, r ) of (X, r). As a consequence, it follows that again the groups G(X, r) are abelian-by-finite. Recall that a set X with a self-distributive operation is called a rack if the map y → y x is bijective, for any x ∈ X (cf. [29]). In contrast to the involutive case, the set X is not necessarily canonically embedded into G(X, r), the reason being that M (X, r) need not be cancellative in general (i.e., it is not necessarily embedded in a group). Hence, for an arbitrary solution (X, r) the structure monoid M (X, r) contains more information on the original solution. However, it is in general not true that two set-theoretic solutions (X, r) and (Y, s) are isomorphic if and only if the monoids M (X, r) and M (Y, s) are isomorphic. This does hold if one of both solutions (and thus both) is assumed to be an involutive non-degenerate set-theoretic solution.In this paper we give a structural approach of the study of the structure monoid ...