“Script” is the most general of the three terms, and is not reserved for any specific type of media. “Screenplay” specifically refers to the script of a film or television program. “Teleplay” is even more specific, and is only used when referencing television scripts.
So a teleplay is a type of screenplay which is a type of a script.
Since “script” is such a general term, script formatting can vary wildly. All screenplays share a general universal format, but there can be slight variations based on type or other factors. Multicamera teleplays, for instance, have double-spaced dialogue, while single-camera teleplays and film screenplays do not.