Ideology is socially constructed and those who are in power make it. This an insight from sociology. Let me give an example. Those in power, obviously, want to keep their power. So, what they do is try to create a commonsense view of the world that basically says that the world is the way it is supposed to be. The rich are supposed to be rich, because of certain reasons, and the poor should be, because of another set of reasons. They also try to create fear and false correlations to maintain their position.
When it comes to social stratification, ideology will be much more subtle, because it is such a sensitive topic. Here is an common ideology. The best answer that I could give is that all people pretty much start at the same place in life, that all people have the same opportunities. We would like to believe this, but it is patently false. Those who are wealthy have much more opportunities.
I assume that you are talking in terms of sociology here.
A typical definition of "ideology" in this context is that it is a set of cultural beliefs that justify the way things are in a society. "The way things are" can include inequality.
If you are using ideology in this way, you can see how it causes social stratification. For example, in the United States, our cultural beliefs (ideology) tell us that people become richer or poorer based on their own abilities and efforts. Because of this, we are often not willing to help people who are poor because we see it as, in part, their own fault. In this way, our ideology prevents us from helping the poor (one can argue) and that helps lead to social stratification.