Is it common to buy a gift for a supervisor when he invited me to a dinner? 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).