If you search on google, you can find Mazda Canada's old brochures in pdf form detailing the trim levels for the Mazda 3, but here's a quick run-down.
S = sport, which is a hatchback. GS is a trim available in both sedan and hatchback, GT is the next step up. Sedan comes in GX, GS, GT (only the sedan GT has 2.3L engine), hatchback comes in GS and GT (both with 2.3L) if you're talking about 2006 - 2007 Mazda 3s.
And as for whether to pick a sedan or hatch... I used to be a sedan guy myself, never liked the hatchback because of its looks. I thought it looked too fat, to be honest. Then I took a look at the GT trim of the hatchback and was immediately sold on its looks... it's the lowered side skirts and larger roofline spoiler, plus the angle of the windows, made it look well planted, like a sprinter on the starting blocks ready to take off.
That, and the extra cargo space + fifth door with its huge opening, gives you more loading options for stuff.
"Mazda Brochure" =
http://www.mazdabrochures.com/Mazda_3_Brochures.html