Let me attempt to find a dividing line between these three types of language. Of course, there will be numerous exceptions and counterexamples, since this is just my opinion.
Note that scripting languages are a subset of programming languages i.e. a language may be both "scripting" and "programming": Python is regularly used to "mediate between programs", and also to "transform data". There are other languages like Java which are seldom used to "mediate between programs", not because this is impossible but because they are not designed to make this easy. The key feature of a scripting language is that it can orchestrate other programs, just like a script gives the cue to an actor to start his part.
|show 2 more comments|
A markup language is a language which is used to represent structured data. For example, HTML enables to specify that some part of the document is a title or some other part is a list, by comparison to a flat text document.
Markup languages are not considered as programming languages¹.
The difference with programming languages is not always obvious. For example, XSLT is a Turing-complete language², but is based on XML which is a markup language.
Wikipedia itself makes important efforts to avoid qualifying XSLT as either a programming language or a markup language. It only says it's a declarative language, and that it uses “optimization techniques found in functional programming languages and database query languages”.
A scripting language is a programming language which is interpreted, rather than compiled, which means that scripting languages represent a subset of all programming languages.
It is not always obvious whether a programming language is a scripting language, like it's not always obvious whether a language is compiled or interpreted. For example, PHP may be compiled to intermediate bytecode³ and then ranslated into machine code by JIT compiler, while being still considered as scripting language⁴.
See also: Splitting Meta-Hairs by Steven Lott.
¹ “XML is not a programming language”. See XML in 10 points.
² “XSLT is a Turing-complete language” See XSLT on Wikipedia
³ “HHVM compiles Hack and PHP into an intermediate bytecode. This bytecode is then translated into x64 machine code dynamically at runtime by a just-in-time (JIT) compiler.” See HHVM.
⁴ Scripting languages in List of programming languages by type on Wikipedia.
A markup language is used to describe data rather than logic. A typical use of them is to describe document formating, HTML is designed for this for example. But they are sometimes used as general data formats as well, XML is a markup language that is often used to just describe data.
The difference between programming and scripting languages is very fuzzy, both tend to be turing complete in that you can solve any computable problems with them. There are some general 'hints' that you can look for to see if a language is a programming language or not.
But in the end, if a language is scripting language or programming language is more a matter of convention rather than any strict criteria. Even the hints above are just trends, you will find programming languages that fulfill all the criteria for a scripting language yet are still considered programming languages.