Opportunism is when someone takes advantage of a situation to gain something. For example, if you worked hard on a project and your coworker got the credit for it, you could call them an opportunist, because they didn't do any work but took advantage of the situation to get the credit.