Greg is correct in that there isn't, and has never been, any definite
article "ye" in the English language.
Before printing was invented, a special letter was used for the "th"
sound in "the". I think this was the same "thorn" letter that's still
used in Icelandic. I tlooks like a slightly curved "d" with a bar
across the stem.
Some printers didn't have this letter in their fonts, and used "y"
instead.
Shop signs like "Ye Olde Englishe Magicke Shoppe" are modern
constructions that have about as much in common with medieval English
as the famous "Blinklights" signs have with German.