Rac gave a pretty good summary. I'll just add my two bits in the form of an example.
Say you have five people who all attacked someone together. The police show up on the scene, and they arrest everyone. During the arrest, they find a prohibited weapon on only one of the accused.
Now, in that case, they would probably have all the charges tried together - unless the defence could make a case to show undue prejudice to do so.
However, if subsequently, one of the accused went back and beat up the same guy again, that charge would be tried seperately - even though the same accused and the same complainant were involved.
As for the issue of seperate lawyers... Rac makes a good point. A really good example of this is when people are jointly charged with drug offences. When the police find drugs, they often charge everyone who might possibly be connected - to ensure that person X won't say that they were person Y's drugs and they discover that person Y wasn't charged. However, at court, if person X pleads guilty, they will often withdraw the charges against person Y. Hense, they both need seperate lawyers so that afterwards, person X can't claim that their lawyer sacrificed them to save person Y.
Hope that helps.
ML