i was driving passed a police officer when i noticed he was making a u-turn to follow me, so i pulled into the first parking spot i saw and got out as i was locking the car the officer pulled next to me with the lights on and citied me for dwl
Yes, according your scenario. In terms of possible consequences, you need to check your citation for the section of the vehicle code that you are charged with violating. Is your license suspended or do you just not have one? Check Section 1501 (Driving without a License) and 1543 (Suspended license/ DUI suspension) of the vehicle code.
That being said, just because you are charged does not mean you are guilty. You can certainly request a hearing to make the Commonwealth prove their case.