With Zero Spread Accounts, your broker is the market maker (trading against you) so the broker determines the bid/ask prices and with this arrangement you can get exactly 0.0 pip spread, but you pay a flat commission per trade.
With ECN Accounts, the broker does not determine the bid/ask price instead the liquidity providers (such as banks, hedge funds, oil companies) are the ones that determine the bid/ask price.
The result is that with ECN Accounts, you may not get exactly 0.0 pip spread on all instruments and you also pay a flat commission per trade but the ECN Account commission is always lower than that of Zero Spread Account.