>>49157764>Do they just appear out of thin air?Whether you mean the actual infant or the incubator-like egg itself, yes.
Pokemon are more than capable of miraculous, instantaneous conception and don't have sex the way real world lifeforms do, because the brand doesn't want to go that direction with its lifeforms. Our best frame of reference for this miraculous conception is that of Solgaleo and Lunala, who do a mystifying dance-esque ritual to bring life to a newborn Cosmog. Mind you, these aren't TRUE Legendary Pokemon, they're considered completely normal Pokemon from a different universe altogether who were only christened Legendary by Alolan Natives (and the rest of the world, naturally, followed suit on accepting this due to the line's power to traverse dimensions and use Ultra Space).