A lot of people may become confused with irony and sarcasm. They may sometimes have trouble knowing which is which. The irony is what you use when you would like to express your meaning in a way that you are showing that you are not so naive to what the other people is thinking.
This means that those who understand irony usually know that they are not native and they are quite intelligent. Sarcasm is saying something but letting the person know that you mean the exact opposite of what you are saying. You use sarcasm when you have some contempt or when you want to hurt the other person through your words.