You need the air gap with the washer standpipe which has a minimum 30 inch height requirement. Below the 2" (some codes may allow 1.5" but it is more restrictive and I don't recommend it) standpipe will be a 2" trap. The trap will hook into a tee that goes to the drain with a sanitary tee connection. The vent continues on up from the tee by the trap and into the ceiling and then either hooking into another vent that goes through the roof (if it is big enough) or else through the roof on its own.
Consult a plumber in your area. Find you a plumbing book or keep searching the web for a picture. If you are not properly vented, then water will backup the standpipe and out when the washer pumps water. Air gaps are required in the event (although I think unlikely) that a washer valve would fail and sewage could then back up into the fresh water supply pipes. Even if the water valve didn't fail, you could end up with sewage in your washer. But you have to follow code to be able to properly sell your house later.