This is standard Lie groups and algebras theory, perhaps consult Bourbaki Lie Groups - the book on compact Lie groups.
A sketch of the proofs:
First, note that if $\frak{g}$ has center $0$, then $\frak{g} \simeq$ $\text{ad}\frak{g}$, so we are done. So we have to deal with the general case, when $\frak{g}$ has a nonzero center.
$\text{Int} \frak{g}$ being a compact subgroup of $\text{gl}(\frak{g})$ implies there exists a positive quadratic form $\langle\ ,\rangle$ on $\frak{g}$ invariant under $\text{Int} \frak{g}$. For this form we have
$$\langle [X,Y], Z\rangle + \langle Y, [X,Z]\rangle = 0$$
From here we conclude that if $\frak{i} \triangleleft \frak{g}$ is an ideal of $\frak{g}$, then $\frak{i}^{\perp}$ is also an ideal and
$$i \oplus \frak{i}^{\perp} = \frak{g}$$
Take $\frak{i} = z$, the center of $\frak{g}$. Then we $\frak{g}$ is a direct sum of $\frak{z}$ and $\text{ad}\frak{g}$. You are more or less done.
The following are equivalent:
$\frak{g}$ is a compact Lie algebra
there exists a positive quadratic form on $\frak {g}$ that is $\frak{g}$ invariant ( see the equality above)
the Killing form on $\frak{g}$ is negative semidefinite
$\frak{g}$ is isomorphic to a Lie subalgebra of $so(n,\mathbb{R})$ for some $n$.
In particular, a Lie subalgebra of a compact Lie algebra is also compact