Instructions
Go to your local library and check out medieval books and manuscripts. Geoffrey Chaucer, the father of English literature, is probably the best place to start. Read "The Canterbury Tales" or "The Book of the Duchess," as they are some of his most renowned works. By reading such works, you'll become intimate with the medieval setting to the point where you'll become quite comfortable with the nuances of the language, including spelling, phrasing and expression.
Take a medieval literature course at your local college. Many schools offer literature classes that either specialize in, or cover in detail, literature written during the medieval age. Not only will you learn the language and become familiar with the setting but you will also gain much insight into the context of medieval life itself. Since medieval English is notoriously difficult for the layman to interpret, classes will help you understand the slang, humor and even political struggles of the day, providing you with a solid, academic basis for writing your dialogue.
Watch medieval movies. Maybe you don't have the time to spend hours researching in the library, and maybe you aren't terribly interested in paying for a college course. If you're just writing for fun, and aren't terribly worried about historical context and precise word origins and etymology, then put in a good movie set in medieval times. "The Lion In Winter," starring Peter O'Toole and Katharine Hepburn and "The Name of the Rose", starring Sean Connery, are two examples of well-researched, historically accurate movies.