A play is a literary work intended for performance, typically in public. The performance is also called a play, and takes place on a stage, usually in a theatre.
The world's most famous playwright is William Shakespeare, and Hamlet is probably his most famous play.