Question: How did the sword get in the stone in the first place?
Answer: While not explicitly stated, the film's prologue implies that the sword appears via divine intervention. The opening song mentions that only a miracle could save war-torn England and then "that miracle appeared in London Town; the sword in the stone."
Answer: Disney pursued the image of a finely-finished longsword imbedded point-first into a boulder, which would be an impossible scenario outside of magical or divine intervention. However, there may be a grain of truth to the original Arthurian legend. Most ancient swords were not crafted by master swordsmiths, and military swords were quickly mass-produced in ancient times. The mass-produced swords were not conscientiously hammered and folded and shaped and tempered by a smith, but were simply smelted metal poured into open-faced molds. The metal casts were then extracted and finished with grinding and abrasives. Sometimes such a fast-food blade hardened and became stuck in the mold (in which case, in a primitive mass-production setting, they discarded the mold along with the sword, as they couldn't extract it without breaking the mold and/or the brittle sword. Both the sword and the mold were equally useless). Those discarded molds with blades locked in situ, recovered long decades or even centuries afterward, are likely the origin of Sword in the Stone legend.
Answer: This particular depiction of the Arthurian legend doesn't address it. Other tellings have various theories such as Merlin placing it there intentionally, Uther driving it into the stone as he was dying, or it simply appearing magically. As this is a children's movie, it isn't considered important to the plot.
Question: Why is Sir Ector so mean to Arthur? Why does he hate him?
Answer: Part of it is the cliche of the abusive or angry step-parent or adoptive patent. Although this is something that does occur, Sir Ector just thought more highly of his own son and would rather see his son become king. He probably regrets having to take care of him, but felt obligated as a knight of Uther Pendragon. In addition, he's more of a brute and fighter and doesn't like learning (or magic). So when Arthur displays an aptitude towards learning over fighting, Ector has less in common with the boy and treats him as a servant.
Answer: Arthur was voiced by three actors. Rickie Sorenson and Richard and Robert Reitherman. Rickie originally voiced Arthur but, during production of the film, Rickie hit puberty causing his voice to change, so Wolfgang Reitherman chose to use his own sons to replace Rickie.