DON'T go off on a Facebook rant about it
Keep what happened on a need-to-know basis until it's all over. Again, if it's remotely serious, you really don't want that dirty laundry aired in public. Insurance investigators scour the net when there's something even vaguely suspicious, so even if you did absolutely nothing wrong, keep your mouth shut lest something get misconstrued.
Tell the insurance company ASAP
Assuming you're physically alright, this really needs to be the first step when you get home -- or to work, or wherever you were headed when your day went south. If you're at fault -- and, c'mon, if you are, you know it -- call your agent and be upfront with what happened. They're not the one you worry about, so don't give them a song and dance. If you're the innocent one, get on the phone with the other driver's insurance pronto. If you wait too long, you're setting yourself up for complications, up to and including denial of claims, depending on the situation.