You'll likely need a couple pairs of gloves. most gyms require a certain size for sparring. Probably 16oz. This tends to be the size required for boxing and muay thai fights as well.
For hitting a bag, i like to use light gloves and that is how my muay thai instructor taught me.
Some people like to use the 18oz for training so that when they fight, their gloves feel lighter and they will be faster. I'm not a big fan of this, because, in theory, your aim could be affected and I'm a big fan of training as close to how you compete.
Bottom line is this: Ask the coach what he would recommend/require, and if they have no recommendation, go with 16oz for your first pair. Try on the gloves before you buy them. Everyone's hands are a bit different so some gloves might not fit quite right.