Mark's answer is right, but there are a couple of exceptions that you need to understand. First off, as he points out, double jeopardy does not apply to a crime that is both state and federal. So if you're found not guilty by the Commonwealth, and you committed a federal crime (say a murder as part of an act of terrorism), the feds can then try you.
If you testified at trial, saying you didn't do it, as pointed out you would be charged with perjury. But further, any statements that the defendant made under oath would be looked at by a prosecutor in this type of situation.
If the defendant's statement opens up a new crime, or one that wasn't charged, the defendant can be prosecuted on that. Let's say the defendant and the victim got into a car accident. Police think the defendant was drunk, but weren't able to find the defendant until after he sobered up. Defendant after the accident shoots the victim. Jury doesn't believe the police and acquit.
Then the defendant gives an interview where the defendant admits to drinking at a bar all night long, would have broken the breathalyser he was so drunk. He can now be prosecuted for DWI, using his statement and the records from the bar.
This has happened.
And as happened to an attorney I know, the defendant, after the jury says, "Not guilty," says to his attorney loud enough to be heard by the judge, "You mean I fucking got away with it?" Judge sentenced him to a week in jail for contempt of court.
And as stated, it doesn't preclude a civil suit, with its lower standard of proof.
Best of luck,
Jim Clark-Dawe