Generators are the gadgets that produce electricity from mechanical energy. Alternators are a class of generators that produce alternating current. So, one can call every alternator a generator. (There are other classes of generators that produce direct current.)