The energy conversion taking place in a DC Motor and an AC Generator respectively are:
Electric energy into mechanical energy and mechanical energy into electrical energy
DC Motor converts electric energy into mechanical energy and AC Generator converts mechanical energy into electrical energy.