Ba₃(PO₄)₂ is a compound made of a metal cation and polyatomic ion.
polyatomic ion is when 2 or more atoms are covalently bonded together and together have a charge and can act as one compound that can bond with another atom.
In this case Ba²⁺ is the metal cation and PO₄³⁻ is the polyatomic ion. this is called the phosphate ion. one phosphate atom is bonded to 4 O atoms with an net charge of -3 and acts as a single unit.