To profiteer is to take advantage of a situation or a person in order to make money. A landlord might profiteer during a housing shortage by doubling rents.
When you profiteer, you don't just profit — you profit more than you should at the expense of someone else. You can also call a person who does this a profiteer. Profiteers famously take advantage of things like scarce food or ongoing conflicts to make a lot of money. The word existed but wasn't commonly used in English until World War I, when journalists started talking about "war profiteers" who benefited financially from shortages and desperation.