What is a Casimir operator? If I have semi-simple Lie algebra $\mathfrak{g}$,I can define the killing form (which is a non-degenerate bilinear form). Let $\begin{Bmatrix}X_i\end{Bmatrix}$ be a base of  my algebra and $\begin{Bmatrix}X^i\end{Bmatrix}$ the dual base (induced by the Killing form). The Casimir operator should be $ \Omega =\sum X_i \otimes  X^i$. What does it mean that $\Omega$ commutes with the elements of the algebra?? It is only an endomorphism on $\mathfrak{g}$...

You can view it as an element of the universal enveloping algebra $\mathfrak{U}(\mathfrak{g})$. It ends up commuting with everything in$\mathfrak{U}(\mathfrak{g})$ and is hence in the center.  If you have a representation of $\mathfrak{g}$, elements of the center of $\mathfrak{U}(\mathfrak{g})$ will act by $\mathfrak{g}$-equivariant endomorphisms (i.e. vector space endomorphisms commuting with the action of $\mathfrak{g}$). Moreover if you are working over $\mathbb{C}$ and your representation is finite dimensional and irreducible any element of the center will act by a scalar.
