Take the cyclotomic integer $g(\zeta)=-1-\zeta^{3}-\zeta^{5}+\zeta^{6}-\zeta^{14}-\zeta^{17}$. The ideal $\langle g(\zeta)\rangle$ factorizes to $\langle g(\zeta)\rangle=\langle47, \psi_{47}(\zeta)\rangle^{3}$. The number $\psi_{47}(\zeta)$ is the second generator of the prime ideal that divides the prime integer $47$. Edwards proves in his marvelous book Fermat’s last theorem in chapter 4.4 that the prime ideal $\langle47, \psi_{47}(\zeta)\rangle$ is not principal. Because the class order of the prime ideal $\langle47, \psi_{47}(\zeta)\rangle$ divides the exponent n of any ideal for which the ideal $\langle47, \psi_{47}(\zeta)\rangle^n$ is principal the class order of the prime ideal must be $3$. Because the class order divides the order of the finite class group the integer $3$ divides the order of the class group.
Now take the homomorphism $\sigma: \zeta\to\zeta^5$ with the primitive root $5$ modulo $23$. The cyclotomic integer $h(\zeta)=-1-\zeta-\zeta^{7}-\zeta^{15}+\zeta^{17}-\zeta^{19}$ factorizes to $\langle h(\zeta)\rangle=\langle47, \psi_{47}(\zeta)\rangle^{2}\cdot\langle47, \sigma^{2}\psi_{47}(\zeta)\rangle$. Therefore the prime ideals $\langle47, \psi_{47}(\zeta)\rangle$ and $\langle47, \sigma^{2}\psi_{47}(\zeta)\rangle$ are in the same class or $\langle47, \psi_{47}(\zeta)\rangle\sim\langle47, \sigma^{2}\psi_{47}(\zeta)\rangle$. Consecutively applying the homomorphism $\sigma^2$ gives $\langle47, \psi_{47}(\zeta)\rangle\sim\langle47, \sigma^{2w}\psi_{47}(\zeta)\rangle$. The cyclotomic integer $k(\zeta)=\zeta^{5}+\zeta^{6}+\zeta^{9}+\zeta^{14}+\zeta^{17}+\zeta^{18}$ factorizes to $\langle k(\zeta)\rangle=\langle47, \psi_{47}(\zeta)\rangle\cdot\langle47, \sigma^{11}\psi_{47}(\zeta)\rangle$ and we get $\langle47, \psi_{47}(\zeta)\rangle^2\sim\langle47, \sigma^{11}\psi_{47}(\zeta)\rangle$. Therefore the prime ideals $\langle47, \sigma^{u}\psi_{47}(\zeta)\rangle$ divide into the two classes $\langle47, \sigma^{2w}\psi_{47}(\zeta)\rangle$ and $\langle47, \sigma^{2w+1}\psi_{47}(\zeta)\rangle$. Together with the principal class we have these three classes and a clear outline of the class group of the $23^{\text{rd}}$ cyclotomic ring of integers. The calculation with classes is explained in chapter $5$ of Edwards.
Neither the factorization nor the the generator $\psi_{47}(\zeta)$ come out of the blue. We now leave Dedekind’s theory of factorizing into prime ideals and return to Kummer. Kummer paved Dedekind the way to his theory of uniquely factorizing ideals to prime ideals by finding out that the $p^{\text{th}}$ cyclotomic ring of integers, p a prime, can uniquely be factorized to (Edwards’s term of) divisors. Divisors are principally the same as prime ideals though they are closely connected to cyclotomic integers. Edwards introduces divisors in chapter $4.12$ to the greatest common divisor of the two cyclotomic integers $(47, \psi_{47}(\zeta))$. If and only if the prime ideal $\langle47, \psi_{47}(\zeta)\rangle$ is principal a cyclotomic integer exists that has the divisor $(47, \psi_{47}(\zeta))$.
Kummer found the number $\Psi_{47}(\zeta)$ (see chapter $4.9$, Edwards, and mind the capital letter $\Psi$, the generator above has the small letter $\psi$). This number has the quality that the cyclotomic integer $r(\zeta)$ is divisible n times by the divisor $(47, \psi_{47}(\zeta))$ if $47^n$ divides $r(\zeta)\cdot\Psi_{47}^n(\zeta)$ and $47^{n+1}$ does not divide $r(\zeta)\cdot\Psi_{47}^{n+1}(\zeta)$ (see chapter $4.10$, Edwards). In the terms above the prime ideal $\langle 47, \psi_{47}(\zeta)\rangle$ divides the principal ideal $\langle g(\zeta)\rangle$ three times because $47^3$ divides $g(\zeta)\cdot\Psi_{47}^3(\zeta)$ and $47^4$ does not divide $g(\zeta)\cdot\Psi_{47}^4(\zeta)$. The generator can be calculated to
$\psi_{47}(\zeta)=\sigma^1\Psi_{47}(\zeta)+\sigma^2\Psi_{47}(\zeta)+\dots+\sigma^{21}\Psi_{47}(\zeta).$
If the generator has multiplicity of more than $1$ with respect to the prime ideal $\langle 47, \psi_{47}(\zeta)\rangle$ Edwards adds the integer $47$ so that it has multiplicity $1$ (see chapter $4.12$, Edwards). The number $\Psi_{q}(\zeta)$ can easily be computed though for large p or q this calculation needs some optimization.
The procedure allows to outline the class group of any $p^{\text{th}}$ cyclotomic ring of integers for a prime p. Together with Kummer’s class number formula given in chapter $6$ of Edwards you can even determine the class group. As stated in an answer above you normally have to determine the classes of a high number of ideals in order to determine the class group of a cyclotomic rings of integers. But having found all classes according to Kummer’s class number formula you can stop pretty soon. The only obstacle that remains is therefore Kummer’s class number formula that demands thorough understanding of complex analysis in $\mathbb C^n$.
The procedure of determinating the class group of cyclotomic rings of integers by factorizing cyclotomic integers as demonstrated above has been done for a couple of cyclotomic rings of integers. The result can be taken from chapter 19, here.