German universities typically make admission requirements available on their websites. They also describe what level of German is required in foreign applicants. Below are three examples:
Unless you want to study German linguistics or literature, the required level of German is DSH-2 or another certificate that for an equivalent level. DSH stands for Deutsche Sprachprüfung für den Hochschulzugang or "German language examination for university entrance".
One of the most common alternatives (and for which I have helped Chinese students prepare) is TestDaF level 4 (TDN 4). TestDaF stands for Test Deutsch als Fremdsprache ("Test of German as a foreign language"). In order to reach level 4 in TestDaF, you need to reach at least level 4 in each part of the exam (reading skills, listening skills, writing skills, speaking skills).
Other alternative certificates include telc C1 and the Goethe-Zertfikat C1. These certificates correspond roughly to level C1 in the Common European Framework of Reference for Languages. You need to check the information on the website of the university where you want to apply to make sure that you are preparing for a certificate that they accept.
If you want to study German linguistics or literature, the required level is higher, namely TestDaF level 5, DSH-3, Goethe-Zertifikat C2:
Grosses Deutsches Sprachdiplom or a similar certificate for the same level. C2 of the CEFR represents a near-native level of German.
This means that in addition to reaching the required level of German, you also need a bit of preparation for the exam format itself. However, courses that prepare you specifically for one of these exams (15-20 hours of instruction to prepare for TestDaF) typically assume that you already have the required level as a result of other language courses. So your first task is to take your level of German to level C1 in the CEFR framework.