Automagically is a portmanteau word: a combination of ‘automatically’ and ‘magically’.
The term is used to describe a technical process that combines machine-logic, and conditional or contextual manipulation (the type of manipulation more likely to be associated with human intelligence).
Any sufficiently advanced technology is indistinguishable from magic. -Arthur C Clarke
An automagical process is one where a variable output or endpoint suggests a level of reasoning that would not normally be attributed to a mechanical process. In comparison, an automatic process is one where the system is unable to adapt to change, typically with only a single, or at least limited number, of outputs/endpoints.
In some ways, the term ‘automagically’ can be considered a colloquial ‘pointer’ to the computer science concept of artificial intelligence.