The first step is to make doubly sure there isn't already a bridge, or a common place people already cross at. No sense in getting wet or risking anything if there is an easier, or proper crossing, a few hundred yards up or downstream.
The other first step is to make sure you are all safe when you cross. Bring a strong rope that is long enough to span the river, or to at least span to a spot midway where you can take a break. A hundred foot rope strong enough for this purpose should be fine for most typical back country adventures. You can then tie the rope securely to the first person crossing, and hang on to that as a safety device in case the crosser wipes out and loses control. Learn the proper techniques for the ad-hoc harness. The rope also comes in very handy in hauling backpacks or other gear across the river. Once someone makes it across.
If the river is not violent, and the danger of falling in is simply that you get wet, have to swim to the other side, then bushwhack through some dense mosquito infested brush to get back to the trail, then you should not use the rope. Use the rope where the danger of falling into the drink is very serious, e.g. a waterfall is not far ahead.
As for where to cross, I disagree with Aaron's answer to target a deeper spot. Shallower is better*. Deeper being slower depends on the width of the stream being constant, which isn't always true. Additionally, the force you feel in a deeper section will be greater, and will be higher up on your body, making it more difficult for you to balance. If it's shallower, and you can see the bottom, you're pretty much in the clear as long as you don't rush yourself.
When you cross, walk across, slowly and carefully. Contrary to Aaron's answer, don't swim across, walk. You can put your feet down. However, the dangers of getting a foot stuck, as he mentions, are very real and very serious. If you maintain your balance as you walk across, you will be fine.
If you lose your balance, immediately pull your feet up, and position yourself flat on your back with your feet in front of you, up high. If the river is violent, your friends can haul you in using the rope. If the river is gentle but strong, then float down in the described position, and paddle yourself to one side or the other, and get out. There is no real technique as far as I am aware, just doggy paddle. Resist the temptation to try and put your feet down to stop you from floating downriver. If the river is deep and fast-moving enough to make this whole ordeal concerning, it is fast enough that if your foot gets stuck you will not be coming back up alive.
Afterwards, collect all your gear, dry yourself off, and continue onward.
*This answer based on the assumption that the river is not very deep, and where 'shallow' is not any deeper than waist height.