In most cases, they are nonmetals.
If you look at the following list of polyatomic ions, you will see that most of them are made of nonmetal elements but like so often in chemistry, there are exceptions.
That list is not a complete list of all polyatomic ions but it does show that in most cases, it is nonmetals that are bonded together and the whole particle has an overall charge. A couple exceptions that you will see on the list are the chromate and dichromate ions. They each contain chromium which is a metal.