For Marx, any cultural phenomenon, including problematic or helpful ideologies, is supposed to be explainable in terms of economics, directly or indirectly.
Here are some examples.
1) One of the most important reasons that Europe was capable of the kind of virulent anti-Semitism that occurred leading up to WWII was an economic reason. Medieval Christendom considered "usury," that is, lending money and charging interest on the loans, to be a mortal sin. However, there was a real need for money to be borrowed and lent, a need for banks. The problem was solved by non-Christians (Jews) who were willing to lend money to the Christian majority. (Borrowing money at interest was not considered a sin by Christians, so they could borrow money from Jewish bankers, but not become bankers themselves.) Incidentally, Jews also considered it sinful to charge interest to other Jews, but not to non-Jews. So they'd be willing to be bankers for the Christian majority. (Islam also forbids usury, but Islamic cultures handled the need for banking a different way, constructing lending institutions that don't charge interest for a loan but instead are given some ownership in the business in question.)
Over the centuries, as the new middle or mercantile class grew, banking families became prominent and successful, and they were often Jewish families. Of course, there were also plenty of working-class Jewish people, and ill-paid, hard-working Jewish professionals such as physicians, but these people were far less visible to the non-Jewish population. Thus, the interests of wealthy industrialists and bankers (largely non-Jewish) became unfairly associated with -- the whole Jewish race!
Underpaid, overworked German laborers were understandably angry with the wealthy class profiting by their work. But rather than holding the specific unfair bosses responsible, these workers scapegoated anyone with any Jewish blood (not just practicing religious Jews), and let the non-Jewish bosses off the hook. Things were exacerbated with the economic catastrophe in Germany following the draconian Treaty of Versailles following WWI, which bankrupted Germany by saddling it with war debts. Non-Jewish Germans also began blaming Jewish bankers, and by extension, all people of Jewish ancestry, for losing the war. There are similar dynamics in our own country and around the world today. It is as though people get angry at those who are more powerful, but people are too afraid to confront the powerful themselves. Instead, they tend to find some obliquely associated group (maybe even one that overlaps just a bit) that is more vulnerable, to take the blame.
2) The North American economy, and the NAFTA North American trade agreement have increased anti-Hispanic racism in the U.S. partly by the double-standards of their rules. E.g. wealthy corporations are permitted to move through national boundaries easily, while individuals are not. A frequent and typical result: U.S. corporations, e.g. G.M., can move factories from the U.S. into Mexico, to cut production costs because of the cheap labor, less effective unions, less stringent pollution laws, etc.. U.S. workers are laid off, and Mexican workers have new jobs, but they pay poorly and have few benefits. The U.S. workers may blame the Mexicans, as well as G.M..
And heavily subsidized U.S.-grown grains can be sold at a very low price in Mexico, because they are subsidized by the U.S. government. Mexican farmers, without such subsidies, can't survive by charging such a low price, so they can no longer compete, and go bankrupt. In desperation, having lost their traditional means of living and unable to find a job to replace it, some come into the U.S. without permission to try to find any work available.
Because they are undocumented, they are a convenient target for scapegoating, which can quickly extend even to U.S.-born Hispanics, many of whose families have been on this continent or even specifically in the Colorado territory much longer than any Anglo-Saxon.
3) Blunter examples include the British describing the colonized Irish, Indians, Africans, Arabs, etc. etc. as "savages" (a convenient attitude when one is hankering after other people's natural resources), the U.S.'s similar ideology of "manifest destiny" used to justify genocide of Native Americans as well as race-based slavery, and so on.