Fag is mainly used as an offensive term for homosexuals. Although it has other meanings, you should probably avoid it at all costs.
This is a very strong word that should be avoided in nearly all situations: fag (short for faggot) is a hateful slur against homosexuals. Because fag is such an offensive word, the other meanings are uncommon, but fagging has also meant working hard and getting tired, as in fagging out. A fag — especially in England — is also a cigarette, and in British boys’ schools, fags are servants for older boys.