It depends on when the charges were dismissed. If it happened after a jury was sworn (or after the first witness was sworn in a bench trial) then you would be protected by the double jeopardy rule, and no charges could ever be refiled relating to the same alleged incident. If the charges were dismissed prior to this time, then the charges could be refiled. However, this generally would not happen unless additional evidence to support the charges was obtained.
It sounds like the charges were either dismissed at a preliminary hearing or were quashed after hearing on a pretrial motion in the higher court. If that is the case then the police or DA can refile the charges but often do not unless it is a very serious crime and they can gather more evidence.
In Philadelphia, if the charges were quashed, they have already been reviewed by a Court of Common Pleas Judge (less whatever charges were already dismissed by a Municipal Court Judge hearing the Preliminary Hearing). The Commonwealth can still rearrest/refile charges against you to go in front of another Common Pleas Judge, who can hold you for court. If they are again unsuccessful and again try, there is a serious problem and you should talk to your lawyer about possible misconduct or abuse of discretion - but it is very rare that the prosecution would go that far.