Somebody can be found guilty of a criminal offense even if he or she didn't actually commit the crime but aided and abetted the perpetrator of the offense in a "joint venture." You can be guilty if you intentionally act with another to commit a crime in order to bring it about and make it succeed. In some cases, statements made by someone in a joint venture are used to convict his or her partner.
In Commonwealth v. DiGregorio, the defendant was found guilty of home invasion, kidnapping, assault, and battery by means of a dangerous weapon. On appeal, he claimed that the judge had improperly admitted statements between two friends, these statements didn't fall under any exceptions to the hearsay rule, and they were therefore inadmissible.
One of the exceptions at issue was the joint venture exception to the hearsay rule. Under this rule, when joint criminal venturers make out-of-court statements against others, these statements are admissible if they are made while a criminal enterprise is pending and in order to further it. The judge must determine whether there was a criminal joint venture between the person making the statement and the defendant, but the judge doesn't need to make a preliminary ruling that there was a joint venture. The evidence can come in, subject to a motion to strike at a later time if the prosecution doesn't show there actually was a criminal enterprise. The judge needs to give a jury instruction informing the jury they can only consider the hearsay if they find there was a joint venture, based on all the other evidence except the hearsay statements.