I understand allan and mas. I don't understand mas with an apostrophe -- "ma's". Duo started using the word mas, then switched to ma's without offering an explanation. And ma's doesn't seem to be in the dictionary.
Ma's is an older spelling of mas. They mean exactly the same thing - "out". You'll see both spellings used in the wild. I'm not sure which one Duolingo prefers.
The reason for the version with the apostrophe is that the word comes from i maes, literally "to (the) field/open country" i.e. "to the outside". In the south, ae in a single syllable word is often pronounced as a long a colloquially and this is how everyone pronounces it in this word now, hence the spellings ma's/mas.
The most common word for "field" today is cae but maes is still used sometimes. It refers especially to a patch of ground for a specific purpose e.g.
maes glo "coalfield"
maes y gad "battlefield"
maes chwarae "playground"
maes parcio "car park"
maes awyr "airport"
It's also used for more abstract "fields" e.g. a field of study or a field in a spreadsheet.
Allan is the standard word, so you'll see it written in public places in the south too, such as road markings and signs like Ffordd allan "way out".
There are many different words used between the north and south but one is usually the preferred "standard".
Here are a few others, with the standard word in italics
allan (N) mas (S) out
bwrdd (N) bord (S) table
dallt (N) deall (S) understand
efo (N) gyda (S) with
For "(to) get out" in Welsh, you'd use mynd mas or mynd allan, literally "(to) go out".
It just so happens that both the command form for mynd "(to) go" and the word for "out" vary according to where someone comes from, which is especially true when someone is speaking informally, which will probably be the case when they're telling you "Get out".
So southerner might say Cer mas (for ti) or Cerwch/Ewch mas (for chi) whereas a northerner would prefer Dos allan (for ti) and Ewch allan (for chi).