As already noted under the theme of Duty, religion for the Romans was very tied up in ideas of obligations, not only to the gods, but to one's family and nation as well. Just bear that in mind so you understand that there's much more in the Aeneid that could be classified as religious activity than just what we're talking about here. But what are we talking about here? Well, on its most basic level, religion in the Aeneid involves making sacrifices and prayers to the gods. The idea was that, if you did that, the gods just might take a liking to you and help you. The thing is, they might also ignore you and mess up your life for no reason. We can see this happening when, even though he makes sacrifices to her and prays to her, Juno just keeps hating Aeneas and the Trojans. Another interesting factor the Aeneid puts in play is the idea that religion has political purposes. You can see this when Aeneas tells Dares to stop boxing Entellus, because Entellus has a god helping him. The narrator hasn't told us this is the case, so we're left thinking Aeneas that might have just made it up.
The function of religion in the Aeneid is mainly political.
The gods in the Aeneid should usually be interpreted as metaphorical depictions of ordinary human psychology.