Under Pennsylvania Rules of Evidence, generally, evidence of a past crime, wrong, or other bad act is not admissible for the purpose of showing that the accused did something bad in his past it is more likely he committed the crime he is presently facing at trial. Stated a different way: it is the general rule that the Commonwealth is not permitted to introduce the defendant's prior crimes or other bad acts for the purpose of showing the defendant committed this present crime or to show "once a criminal, always a criminal."
The easiest example of this is: The accused is on trial for Driving Under the Influence. The Commonwealth would not be permitted from introducing into evidence the fact that the accused was convicted of a simple assault 3 years earlier.
The reason for this rule is to prevent the jury from hearing irrelevant evidence, which has no bearing on the present crime, for the only purpose to tarnish the accused's character to the jury.
The exception to the general rule is when the Commonwealth files a motion and makes the argument that, although the evidence is of a prior crime or bad act, the true purpose is for something that is relevant at trial for the present crime.
The Commonwealth must show the judge that the evidence of the past crime or bad act is relevant to the present crime, because the past crime can show intent, plan, scheme, identity, knowledge, absence of mistake, etc.
The judge must weigh the Commonwealth's argument versus the prejudice the past crime has against the defendant and determine if the jury should be permitted to hear the evidence of the prior crime.
A common example of the exception occurs in PWID cases: Defendant is charged with PWID. If the defendant has a prior conviction for PWID, the Commonwealth will file a motion to allow the jury to hear about the prior conviction for PWID. The Commonwealth's argument will usually be that the fact that the defendant has a prior conviction for PWID shows his intent to PWID or knowledge or absence of mistake in the current charge for PWID.
Pre-trial motions, such as ones dealing with the admission of Bad Act Evidence, are a vital stage in the criminal process. It is important to contact an experienced criminal attorney who can prepare the case and plan and effectively argue any pre-trial motions.