In a Mealy machine, the outputs are a function of the present state and the value of the inputs as shown in the figure 1.
Accordingly, the outputs may change asynchronously in response to any change in the inputs.
Moore machine -
In a Moore machine the outputs depend only on the present state as shown in the figure 2.
A combinational logic block maps the inputs and the current state into the necessary flip-flop inputs to store the appropriate next state just like Mealy machine.
However, the outputs are computed by a combinational logic block whose inputs are only the flip-flops state outputs.
The outputs change synchronously with the state transition triggered by the active clock edge.