In addition to the answers above, I think it is also important to remember that Shakespeare, like any playwrite, was writing for a physical audience in the theater. It is no coincidence that when the curtain first goes up of Act I, scene i of Macbeththat the audience--particularly the groundlings--encounters three hideous witches standing around a bubbling cauldron. Shakespeare knows that he must grab the attention of those groundlings in the very first moments of play in order to temper their unruliness and have them "simmer down" (pardon the pun) long enough for the play's plot to develop. Because witches and witchcraft were fascinating to most people in Elizabethan, Shakespeare knows this "hook" will be effective. Much like violence and references to sex, witchcraft is used, in part, to capture the attention of the groundlings.
In addition to the knowledge of the times included above, concerning Macbeth specifically, Shakespeare wrote it at least in part with King James I, of King James Bible fame, in mind. That's probably why Banquo is depicted as such a hero and a good man in the play--King James really was a descendant of Banquo.
Shakespeare appears to have had James in mind when he gave such prominent roles to the witches, as well. James was fascinated with witchcraft. I don't have first-hand knowledge of the writings, but one British Literature text that I have says James even wrote attacks against witchcraft, until one day when a witch, upset with him, revealed information to him about his past that no one else could have known. I don't know if this is true or not, but the idea that James was fascinated with witchcraft is well accepted.
Thus, Shakespeare, at least in part, wrote to interest and please the king.
During the Elizabethan times there were no less than 270 witch trials all on account of unique causes such as the Bubonic Plague, famine, wars, poisonings, and other odd diseases. Women were often blamed for much maladies, and in general for everything due to their "instinctive" nature and their condition as mothers of mankind.
Shakespeare's reflections of women and witchcraft were a reflection of the times. Characters such as Lady Macbeth and the witches mirror the Elizabethan tendency to attribute females with supernatural and overrated talents and malignancies. By the way, it is interesting to note that other superstitions typical of Elizabethans included the saying of "God Bless You" after sneezing, the watching of eclipses, all forms of witch superstitions (from the flying broom to the cauldron), and the fear of black cats as well as many other ideas we have kept and delegated to Halloween.
It is not at all clear what you want to know here. So I will talk a bit about witches and superstition in Shakespeare's day.
In those days, people were still extremely superstitious. There was not really much in the way of science yet. For example, Isaac Newton wasn't even born yet. So people still did not know much about why various natural things happened. This led them to be superstitious.
So Shakespeare would likely have believed in witches -- believed that they existed and that they had powers.
We do not know this for sure, but we do know that he understood that other people in his time did and so he put witches and magic in a lot of his plays.