Automatically, but in a way that, for some reason (typically because it is too complicated, or too ugly, or perhaps even too trivial), the speaker doesn't feel like explaining to you. See magic. “The C-INTERCAL compiler generates C, then automagically invokes cc(1) to produce an executable.”
This term is quite old, going back at least to the mid-70s in jargon and probably much earlier. The word ‘automagic’ occurred in advertising (for a shirt-ironing gadget) as far back as the late 1940s.