Discrimination is the correct formal word to use in the context of employment and legal cases, for example, if someone broke the law by discriminating against someone. That would mean, for example, they refused to hire a person based on their race, religion, age, and so on; or maybe they refused to let them enter a club based on those things. If you are just talking about a person who holds discriminatory views, we might call them prejudiced or intolerant.They look at the differences among people and want to divide them into groups, with some groups more deserving of privileges than others.
The word discrimination also has a neutral meaning. It means the mental faculty that enables us to distinguish between one thing and another--we can discriminate between large and small, purple and orange, right and wrong, good values and bad values.