There are no general rules on how to apply for a PhD programme. Application requirements and procedures tend to vary from programme to programme.
The most important formal requirement is a master's degree (or equivalent) that is recognised in Germany. Other important factors include your work experience and motivation.
Search here for PhD programmes and positions in Germany:
In these databases, you can search by field of study and/or by inserting keywords.
When you find the PhD programme that interests you then you will need to submit an application containing your CV, a copy of your degree certificate(s) and a letter of motivation. You may also be asked for a letter of recommendation.
For more general information, take a look here.