Generally magic is indeed illegal in our region, however that comes with some caveats and flexibility dependent on location for starters, and the individual casting. For example, a registered member of the Muranni Alchemists' Guild would have access to a magical license, which permits casting magic outside of civilisation and within Alchemists' Guild property. Yet they could get away with public spellcasting via isolated incidents in Murann's streets where magic is slightly more tolerated than elsewhere in Amn, as well as the guild itself being held in great esteem by many Muranni. It should be said that this view isn't for its magic though, but rather its scientific and general accomplishments - which very well might translate to acceptance, understanding, or general overlooking of spellcasting by its members.
Let's say a mage is in the countryside, casting warding magic, when a patrol of the Amnian army happens upon them and catches them in the act. The guards in question may readily assume hostility for various reasons, whether because of personal superstition fuelled by long enduring native beliefs and folk-lore, or the appearance of the person (assuming they're not wearing a uniform of the guild in the moment), but the mage manages to calm the situation and shows their license. In addition to being sanctioned by the Swordbelt Council (not to be mistaken with the Council of Six) through guild membership, the mage is also renowned and mostly liked in the region, resulting in the guards apologising and gladly moving past the incident. In a similar incident guards may even recognise the mage at a glance and immediately know there is nothing amiss.
Now on the flip side, the scenario is the same except the mage is entirely unknown and not a part of the Muranni Alchemists' Guild. The guards may attack and subdue them, or even kill the mage in self-defense if it escalates that far. Even if no combat takes place, the guards will at the very least apprehend the mage who they'll most likely see as a rogue one. From there it could range from extreme escalation, such as going to court for X and Y accusations, to a simple fine and warning, alongside time spent imprisoned. Repeated offenses could result in a sentence by hanging, or ending up outlawed and/or banished in the eyes of the law (which mechanically would entail most NPCs being hostile and attacking you or fleeing from you).
An exception would be divine magic cast by clergy in temples or possibly by shrines. Selunites in particular would have the greatest leeway and safety in Murann, as it's predominantly dominated by Her worship, to the extent of being able to cast with lesser suspicion, perhaps none, if the individual casting is known to onlookers - whether by merit of reputation or apparent regalia (which could just as well be misused and abused by others). Clergy of Selune might even get away with this in a public setting outside of their temple grounds, however there's still such a thing as pushing it even for loved and respected figures - the law often can't be repeatedly undermined without consequences after all. Examples are always set sooner or later in most lawful society.
Something to keep in mind though is that while magic is not outlawed in many parts of the world, a great many people - particularly commoners - will find the practice of magic to be suspicious, and may readily assume dark arts or a more foul power at work, particularly in Amn where folk-lore and aphorisms have always had a distinctly anti-magic bent. The nation's history is steeped in magical incidents, carnage, and The Longest Year has only worsened matters in recent memory.
As you said, much could change about the perception of magic over time for better or worse, due to player led initiatives or perhaps even just the passage of time and all that it might bring with it. All of this might seem confusing or daunting at a glance, however everything is meant to be discovered and learned in-game through RP and engagement with the setting, such as NPCs and the general atmosphere we've carefully cultivated. There's no real need to memorise or remember most of what I've just written as it'll all become evident just by playing and familiarising oneself with TDN's setting.