They were the false gods worshipped by those who did not know the true nature of God.
The Romans/Greeks were quite pious in their worship, at least in their early days. They built massive temples in which to worship and they sacrificed to them. The Parthenon, for example, was built to worship the patron goddess of Athens, Athena. The whole of the mount of the Parthenon is covered with temples to various Greek gods, with the Parthenon dominating.
They had rituals to be observed for each. There was a priesthood which did the sacrificing and who read the omens in the blood of the animals. Female gods had priestesses. They all had their particular areas of concern, like Neptune, God of the Sea was consulted for sea journeys, or fishing and Mars for war.
The people the Romans called barbarians had their own sets of gods/goddesses, like Morrigan for the Celts or Odin for the Norse.
What I understand that the Church says, at least about some of them, is that the pagans gave them names and worshipped them because although they recognised the existence of God, their perception of Him was very imperfect. I believe Paul addresses this in some of his letters, that they worshiped what they did not know.
Others, like Baal/Moloch, imho, were demons masquerading. The difference can be seen in the type of worship demanded. While the Greek/Roman pantheon required moral living and punished people for their sins, Baal wanted human sacrifice.
Still others, would carve a rock or a piece of wood and call it a god. These were the idols. I think these people were con artists, doing it for what they could get by deceiving people into giving them things ostensibly to worship the god. Unfortunately, some people actually believed that pieces of wood or stone really could supernaturally affect their lives.
Some people, even today, offer to idols. I had a Buddhist friend once who offered food to her statue of Buddha.
For us, we must be on guard that we do not place other things in the place of God, such as the pursuit of riches, or happiness or vengeance. These things can become false gods for us when we sacrifice what is precious to us to attain them.