Can talks about ability or permission.
May talks about possibility or permission.
- She can speak five languages.
(ability) - Her parents told her she can go on the trip.
(permission) - It may rain tomorrow.
(possibility) - You may leave when this exercise is finished.
(permission)