A playwright, also known as a dramatist, is a person who writes dramatic plays.
The term is not a variant spelling of "playwrite", but something quite distinct: the word wright is an archaic English term for a craftsman or builder (as in a wheelwright or cartwright). Hence the prefix and the suffix combine to indicate someone who has "wrought" words, themes, and other elements into a dramatic form - someone who crafts plays. The homophone with "write" is in this case entirely coincidental.
The term playwright appears to have been coined by Ben Jonson in his Epigram 49, "To Playwright", as an insult, to suggest a mere tradesman fashioning works for the theatre. Jonson described himself as a poet, not a playwright, since plays during that time were written in meter and so were regarded as the province of poets. This view was held as late as the early 19th century. The term playwright later lost this negative connotation.
The earliest playwrights in Western literature with surviving works are the Ancient Greeks. These early plays were written for annual Athenian competitions among playwrights held around the 5th century BC. Such notables as Aeschylus, Sophocles, Euripides, and Aristophanes established forms still relied on by their modern counterparts. For the ancient Greeks, playwriting involved poïesis, "the act of making". This is the source of our word poet.