Definitions and the Madd letters
Madd (المَدّ) means increase; technically it is lengthening the sound with a Madd letter when it meets a Hamzah or a sukun. Qasr (القَصْر) means holding back; technically it is keeping the Madd letter at its natural length. The Huruf al-Madd (حُرُوف المَدّ) are three: a silent Alif after a fathah, a silent Waw after a dammah, and a silent Ya after a kasrah; all three occur in ﴿نُوحِيهَآنُوْحِيْهَآ﴾ (Hud 11:49). Lin (اللِّين) letters are a silent Waw or Ya after a fathah.
Madd is measured in counts (حركة): the time to close or open a finger at a moderate pace. The real standard is learning from a teacher, not mechanical counting. Madd is either Madd Asli (المَدّ الأَصْلِيّ) or Madd Far'i (المَدّ الفَرْعِيّ).
Madd al-Farq
Madd al-Farq (مَدّ الفَرْق): when the interrogative Hamzah comes on a noun beginning with Hamzat al-Wasl and the article, the Hamzat al-Wasl is not dropped. It may be changed into an Alif with six counts, which is preferred, or eased between Hamzah and Alif. It is named so because it distinguishes a question from a statement. It is in three words, in six places: ﴿ءَآلذَّكَرَيۡنِءٰٓالذَّكَرَيْنِ﴾ (Al-An'am 6:143) twice in al-An'am, ﴿ءَآلۡـَٰٔنَآٰلْـٰٔنَ﴾ (Yunus 10:51) twice in Yunus, and ﴿قُلۡ ءَآللَّهُقُلْ آٰللّٰهُ﴾ (Yunus 10:59) in Yunus and an-Naml.
The strength of the Madds
The strongest Madd is Lazim, then Muttasil, then 'Arid, then Munfasil, then Badal. When two causes meet in one Madd, the stronger is applied and the weaker dropped, as in ﴿وَلَآ ءَآمِّينَوَلَآ آٰمِّيْنَ﴾ (Al-Ma'idah 5:2): there is a Hamzah before the Madd letter (Badal) and an original sukun after it, so it is lengthened six counts.