The ground state and excited spectra of baryons containing three identical heavy quarks, b or c, have been recently calculated in nonperturbative lattice QCD. The energy of positive and negative parity excitations has been determined with high precision. Lattice results constitute a unique opportunity to learn about the quark-confinement mechanism as well as elucidating our knowledge about the nature of the strong force. We analyze the nonperturbative lattice QCD results by means of heavy-quark static potentials derived using SU(3) lattice QCD. We make use of different numerical techniques for the three-body problem.