I am an international student. I have just started my master degree in Canada and I have been invited to a group dinner by my supervisor. This situation and culture are quite new to me; I have not had this experience before. How should I act? Should I buy a gift or something? And if so, what sort of gift seems appropriate?
No, there is no reason for buying a gift. The most you might do is send a follow-up email thanking your supervisor for the dinner.
Having lunch/dinner with colleagues isn't uncommon, and they usually aren't all that formal unless there is a special occasion (e.g., it is banquet organized by the department/university).
If you are invited to a party it is common to take a bottle of wine for the host/hostess, but otherwise gift giving in such situations is uncommon.
However, I'm hearing warning bells if you are female and this is a one to one meeting. Since a supervisor has some power over your future, you need to make sure that you aren't put in an uncomfortable position. Bad things happen. Not always, but they do. Perhaps you are already comfortable with the professor and know of his reputation in social situations.
Two colleagues that aren't in some sort of hierarchical situation may alternate buying a meal for each other (or splitting a tab). But a professor would be less likely to buy a meal for the department head, for example. A supervisor might buy a meal for a group of students.
Actually, I've never been in such a situation, either as the supervisor or the student. It feels a bit weird to me, actually. Hence, warning bells.
I once did some work for a professor in my department when I was a grad student. This was things like baby sitting and yard work. He paid me as he would any employee. We were actually good friends - first name basis - but the relationship was kept very formal so that favors weren't offered or accepted. He wasn't my supervisor, however, but that should make no difference. My spouse and I had dinner with him and his a few times, but part of that was just that we had kids of similar age.
I will leave this answer here for the future, since it wasn't originally clear that this was a group situation. If the group dinner is in a restaurant there is no need to bring anything except your verbal thanks when it is over. If it is at a private home then a bottle of wine is often brought as a token for the host/hostess (assuming alcohol is accepted in your country and his). However, if you are from a different culture/country than the host, then a small souvenir from your home country would often be especially welcome. Something that is typical and might be found in a tourist shop, for example. Preferably, the gift should not have a lot of monetary value - just a remembrance.