There are several differences.
First, demo accounts usually run on a separate server. That alone can cause some small differences even if everything else is identical.
Second (and most important), since there is no real trade taking place,
liquidity is not an issue. It will execute an order for 10 lots the same as an order for 1
microlot. In the real world, your order will sometimes be competing with other orders to get the same price. This means that real
requotes and
slippage will be greater on a real account. I have seen slipppage and requotes on demo servers, but never as extensive as on live accounts.
As a consequence of no real liquidity issues, spreads will not widen as much (or at all) during times of very high or very low trade volume on a demo account compared to a real account.