While such things like graduate colleges (with more... structured programs) exist, the typical way is different.
Prerequisites
PhD studies (or, actually, a doctorate) in Germany typically take between 3 and 5 years. They might take longer, 6 or even 10, but the typical minimal time in terms of required funding and general expectation is 3 years.
Typically, you need a Masters degree for a PhD. While few universities and departments offer loopholes for a Bachelor degrees (commonly known as a fast-track), it's risky, uncommon and sometimes discouraged.
The in-country BSc takes 3 years, an MSc takes 2 years, and a PhD 3 years (or more, per above). Typically, the PhD is oriented purely towards research and therefore, arguably, not a "program" in the common understanding. Formal courses or other requirements are typically non-existing (except for graduate colleges).
Supervision
A German PhD is a kind of personal affair between the supervisor (a professor, but some other options exist) and the candidate. If a candidate cannot have a working relationship with the supervisor, the chances for a successful PhD are dim.
If you want to start a PhD, you ask a professor, if a mentorship / supervision is possible - either formally, by applying for a funded position (see below), or informally. You might get invited for a personal talk where the supervisor-to-be tries to find out where your interests lie and if you would fit personality-wise.
Important for people from the US: there are no centralised graduate admissions. The supervision is a personal matter of a PhD supervisor.
Position
An agreement to supervise a PhD student does not necessarily mean funding. It's the agreement to guide the student in their research, to give them ideas, to give them an opportunity to bounce ideas, to write papers together.
There are paid positions for doctorate students available. Typically, people occupying them aim to get their PhD. This is actually the norm in STEM fields. But an agreement to supervise does not necessarily come with such a position.
Multiple opportunities for a position exits, see below.
University-funded position
Think: TA. You get a contract with the university, are obliged to do something related to your topic of work there, e.g., help with the lectures of "your own" professor.
Typically, departments have some slots for students, funded by the university itself, that are specifically allocated for a prospective PhD candidate.
Third-party funding (Drittmittelstelle)
Drittmittel are external grants (in contrast to the state-provided funds that are used to pay the university funded positions). With the Drittmittel-funds, positions are created at the university that a PhD student might occupy. Even though the funding is through external grant money, the student will be employed by the university. These positions are typically advertised by the university and are for a limited time only (for the duration of the grant project).
The grant is typically tied to a specific project, if the PhD candidate is lucky, the topic of the project can be turned into the PhD topic, otherwise the PhD candidate will have to do most of the PhD research on the side. Some grants will only be for 2 years, not enough to complete the PhD, so there is often the need to find a follow-up position to finish the PhD. Because of this, PhD students on Drittmittel-positions might need to be actively involved in project and grant acquisition.
Stipend from a foundation or the DAAD
Being an extraordinary (foreign) student, or doing a lot of volunteering, etc. might score you a stipend from a foundation (Stiftung), e.g. from an organisation close to a political party or a large industrial company. If you receive a stipend, you are not getting a contract with the university, but rather small benefits payments from the foundation. They do not count as salary, and have thus different tax implications and potentially some impact e.g. in medical insurance.
The German Academic Exchange Service (DAAD) also provides stipends for German nationals, who want to do their PhD abroad, and for international students who want to do their PhD in Germany.
Research institutions (Max Planck, etc.)
Research positions are also available from research institutions, such as Max Planck institutes, Fraunhofer, Helmholtz, Leibniz institutes. These positions are tied to research projects (institute-funded or via third-party funding). Candidates are employed for such a project and formally need an advisor at a university since the research institutes can't award a PhD. However, actual supervision and advice is provided by the institute, often the head of the institute is a professor, though.
R&D at a commercial company
Some companies (especially the bigger ones like e.g. Bosch) might advertise their own PhD positions. The freedom of research is more limited in these positions compared to universities or research institutions (as the company aims to benefit from the PhD students' work), most of the work contributes to the company, a small share of "own" and publishable research might be allowed. The positions are generally paid well and there are no further requirements like e.g. teaching. A university professor as supervisor is still necessary.
Fachhochschule
The Fachhochschule (FH) or Technische Hochschule – by official translation: university of applied sciences – is a college / polytechnic. They were ranked a step lower than "full" universities in the Diplom times, now they provide (at least on paper) the same BSc and MSc as universities.
Some research positions, typically funded from lab or TA functions or from third-party funding (see above) might be available. Typically, the PhD will be co-supervised with a university, but more and more FHs obtain their own right to defend PhD students. The topics would typically be more applied than at a university.
Above means a PhD candidate from somewhere else wants to start a PhD student position at a FH. Below, we talk about a FH-based MSc, who wants to a PhD.
Depending on the field of study at the FH, (and because of the previous inequality between universities and FHs) if a subsequent PhD is done at a university, a PhD candidate might be required to take some extra courses to make up for the difference in study content between the more applied FH and the more theoretical university. In such a case, the courses which have to be taken, would be individually agreed upon with the supervisor and the university's admission office or similar bodies.
Moonlighting
You might work somewhere else. Maybe some remote job or working part-time. As long as you can finance yourself even independent from the university, you can do a PhD, as long as an agreement of supervision with a professor exists.
Admissions
It makes little sense (at least to me) to blindly apply to a graduate college. Always look for advertised PhD positions or pick a professor and ask them directly. Email and inquiry for an appointment would suffice. It is best if you were a star student in their lectures, but a cold email might work, too.
Attending graduate college might be still an option, but your future supervisor will tell you what is better for you.
Recently, a formal supervision agreements ''(Betreuungsvereinbarung)'' are signed, where goals, time frame, etc. for both sides are listed. Previously (and sometimes still?) the supervision was purely an oral contract. What you as a PhD candidate should get, however, is some kind of the statement from the department, that you are a PhD candidate now. If you are not employed at the university, this might be the only document you have about your relation with it.
If you are employed by the university, you will get a contract. Typically it is about E13 (or some share of it), but that's a separate question.
At some (not all) universities, you can immatriculate (get a student card) as a PhD student. For about 200-300 € per semester, this means similar perks as for regular students, you get cheaper food at mensa, a local bus/train ticket and student price at museums, etc.
Not only professors
- Postdocs might have some grants available. Is the supervisor the postdoc or the chair is a question to be discussed.
- Habilitation candidates and habilitated faculty members typically have all the rights of a professor concerning supervision of the PhD students. If they have funding available is the crucial question.
- Junior-Professoren (basically, assistant professors) are same as professors concerning supervision.