I could waffle about ideology until the cows come home, but I’ll try to be concise and avoid waffling. No promises though. I do like the the wording of the question - ‘role’ highlights the performative nature of ideology, which I’ll circle back to.
I’ve seen the word ‘ideology’ used to mean anything from a very narrow and inward facing system of ideas or beliefs, to the thoughts emanating from one particular held value, to an expansive and rather nebulous signifier for the totality of a given culture’s internalised social and ideal norms (or reified culture, or ‘the superstructure’), or any combination of anything within that spectrum. I don’t think these meanings are at all contradictory, because of how expansive the significance of even the most narrow definition is in determining what people believe and how they behave.
Pardon me while I go metaphysical for a minute.
We all experience and perceive the world differently - everyone lives in a subjective reality. However, in order to communicate anything to anyone we have to engage with consensus reality - that which is generally recognised as ‘real’ or ‘true’ for everyone, objectively. The problem is that because no one directly experiences this consensus reality, people disagree over its particulars, and ideology is an attempt to assert a particular vision of consensus reality and how it works based on particular values and ideas.
I’m adapting a phrase uttered by Slavoj Zizek here, but I’d say that ideology’s role in the world is that it provides fantasies which structure our subjective realities - ideology is a way for people to attach meaning to perception in a way that reconciles disagreements over the shape of consensus reality by overriding subjective reality, and provides a moral guideline for how to behave in the overriding consensus reality. Ideologies are in competition to structure our individual subjective realities, to tell us what is real or true and what isn’t, what matters and what doesn’t, whether we’re wrong or we’re right, and what we should want, and what we should despise.
In a narrow sense, an ideology consists of a description of the world, and a prescription for how we should behave drawn from that description of the world and a set of moral values. Fascism, for example describes the world as inhabited by eternal nations that must compete for dominance, values strength and discipline, and therefore we should subordinate our desires, our efforts, our thoughts and our bodies to the nation and its state.
In a broader sense, an Ideology is a system of ideas that colours how we perceive the world - people, objects, social interaction, values and beliefs etc, and provides a framework in which to rationalise meaning from those perceptions. For example, imagine you’re walking down the street when you hear a beggar ask you for spare change. You’ve perceived a person asking you for money. Everything that comes after that in your thought process - what the meaning of this perception is, and what to do about that - will be corralled and mediated by ideology.
‘He’s just gonna spend it on drugs’
‘I’m not going to waste the money I earned on a lost cause, his choices led him to this’
‘Looks like he has it rough, hopefully he’ll be able to get into a shelter tonight; society is so fucked’
‘Look at all these people walking past without even acknowledging him, they should be ashamed’
‘Will people think I’m a sucker if I drop a couple coins in his cup?’
‘If he wasn’t an unrepentant sinner he wouldn’t be on the street, I hope he finds God’
Every one of those potential response thoughts is an example of ideology justifying the attachment of meaning to a perception, which then informs (in)action. Of course implicit (and sometimes explicit) in ideology is the assumption that the ideology is true, and the only truth, so it provides people a framework within which they assign objective meaning to their subjective perceptions.
Ideology in both the narrow and broad senses I’ve outlined, ossifies into a substrate of assumptions that do not originate in your interpretation of reality. Imagine yourself as an orchard - your being as the soil, your identity and sense of self as the trees, and your thoughts and behaviour as the fruit. Ideology is the radioactive isotopes washed into the groundwater from the nearby Fukushima nuclear power plant. From radioactive earth grows radioactive fruit.
Ideology plays different roles depending on who it possesses. For the priest it’s a tool to marshall the disparate desires and experiences of individuals to get them to unite behind a particular vision of consensus reality (‘Campuses are overrun with violent racists!’, ‘Our country is overrun with illegal immigrants!’), and a particular morality (‘No Platform for fascists!’, ‘throw them out and build a wall!’). For the congregation it’s an analytical tool to help make sense of the world and a performative tool used to address their own alienation by creating a consensus reality and an identity they share.