In Germany, access to universities is regulated by the Numerus Clausus system, which basically says that the number of students admitted to any given programme at a university can be either unrestricted or restricted to a fixed number of students.
For an unrestricted programme, students just need to fulfill the basic formal criteria (they need a german Abitur, or an equivalent). For most restricted programmes on bachelor level, prospective students need to apply and are then ranked based solely on their Abitur grades (plus a few exceptions for corner cases, foreign students with no german Abitur, etc.). For restricted master level programmes, many universities (including, apparently, TU Kaiserslautern, as linked by the original poster above) have adopted a more US-style admission system, which is based not only on previous grades but also on letters of recommendation, statements of interest, interviews, etc. TU Kaiserslautern also has its selection procedure online. This will vary per university, though.
Edit: to answer your subquestion (which I happened to have missed the first time around):
Do German universities discriminate students on the basis of their age?
No, not in general, and certainly not officially.