The difference between prejudice and discrimination is that one is an attitude or set of attitudes while the other is an action or actions. Either of the two can potentially exist without the other.
If I am prejudiced, I have negative ideas about people of other groups simply because of their membership in those groups. I may think people of another race are all lazy or stupid, for example. I do not necessarily have to act on this belief. All I have to do is to hold it.
By contrast, discrimination occurs when I treat people differently because of the group to which they belong. I might, for example, refuse to give the top grades to people from a particular ethnic group. I do not have to think anything bad about them, I just have to treat them differently.
Often, prejudice and discrimination do go together, but they do not need to. In modern day America, for example, there could be many people who are racially prejudiced but cannot act on it (cannot discriminate) because of laws and other factors.
The difference, then, is that prejudice has to do with attitudes and beliefs while discrimination is about actions.