It is possible to face criminal charges when you did not commit the criminal act. The law refers to this as criminal responsibility for the conduct of another.
According to the Texas Constitution and Statutes, criminal responsibility, in this case, means that you knew about the crime and acted in a way to allow that criminal act to continue.
The main aspect of criminal responsibility is that you were somehow involved in the crime. It may be that you learned about it prior to it occurring and did nothing to stop it from happening. Another example is that you helped in some way, such as providing a tool the person needed to commit the crime. It also could be that you simply encouraged the person to do it.
Another unique situation is if you were involved in criminal activity, but the crime for which you face charges is something another person in your group committed. For example, if you and your friend planned to steal tires from a shop and once you got there, your friend broke into the shop, you could face a breaking and entering charge even though you did not do it or plan to do it.
Another aspect is that you did nothing to stop what was happening when you could have stopped it. If putting an end to the actions did not put you in danger, and you simply let it happen, you had a duty under the law to try to take some action. For example, you could have alerted authorities.
Criminal responsibility breaks down to the people with which you associate. If they get into legal trouble, it could land you in trouble too.