So! Here's how you grab yourself Magearna. it's thankfully much, much easier now thanks to the 3DS System Camera and QR codes. It's nothing like the good old days where you'd have to get up and go somewhere, lining up in the freezing cold outside a Toys R Us to have some Nintendo representative manually load a Mew onto your copy of Pokemon Blue. Magearna was grabbed through use of a QR Code in regular Pokemon Sun & Moon, and it's thankfully still the same here in Ultra. One such unedited area of the game is the acquisition of your first mythical Pokemon in Alola, which will very likely be Magearna. Pokemon Ultra Sun and Pokemon Ultra Moon make quite a lot of changes from their predecessors, but other areas have remained mercifully untouched.
As the saying goes, you shouldn't look a gift mythical Pokemon in the mouth.