How was magic and the supernatural viewed by Jacobean society?
First, we need to make a distinction between views of magic and the supernatural in everyday life and in literature.
In everyday life, the Church of England was the official national church and religion of England, and the Church of Scotland of Scotland. Both were Protestant Christian churches. Magic was illegal and witches could be burned at the stake. Real magic was considered Satanic.
In literature, however, magic, supernatural, and pagan themes were common, and many of Shakespeare's plays have supernatural elements, as did masques performed at court. Although a certain wing of the church, which grew to greater prominence slightly after James I, found this objectionable, most people clearly distinguished between fiction and reality.
In the Epilogue to The Tempest, Prospero emphasizes this when he speaks of abandoning magic when he leaves the island (an imaginary realm) and returns to the real Naples:
Now my charms are all o'erthrown,
And what strength I have's mine own,
Which is most faint.