Hashem tells Moshe and Aharon to speak to the rock, and it will give forth water. Moshe hits the rock. Hashem punishes them by not allowing them to enter Eretz Yisrael.
What did Aharon do wrong? He stood there while Moshe hit the rock. He did not do anything. So why did he get punished at all, or at least why the same as Moshe?
We see from here that being an accomplice to a crime is just as bad as having committed the actual crime.
Aharon was the guy in the getaway car. If someone goes in to rob a bank, and his partner sits outside waiting for him in the getaway car, they are both equally responsible for robbing the bank.
So Aharon was like that guy in the getaway car. He was Moshe's accomplice. He stood by Moshe's side while Moshe hit the rock. So sure he did not actually hit the rock himself, but he is equally as guilty.
We have to be very careful with whom and with what we associate ourselves. Just being associated with bad, makes us equally as guilty, even if we did nto actually do anythign wrong.