Most personal medicines (cold remedies, stomach aids, allergy pills) enter China without issue - mind the quantity and ingredients.
Rules of thumb: carry a reasonable personal supply, keep original packaging and leaflets, and bring a doctor prescription or medical record (English preferred) for prescription drugs.
Declaring: quantities beyond personal use, or drugs containing special ingredients, must go through the red channel and be declared.
Strictly banned: narcotics and psychotropics (some sleep aids, painkillers) need a prescription and limited amounts; cannabis and its derivatives are absolutely prohibited with serious legal consequences.
Special notes: ephedrine-containing cold medicines and codeine cough syrups are controlled in China too; traditional Chinese medicine with endangered ingredients (tiger bone, rhino horn) is strictly banned.
For long-term medication: check with your airline and the Chinese consulate before departure, carry an English prescription, and declare in advance when necessary.