He instantly transforms upon switching into the battle rather than you having to lose a turn to transform. Once he transforms, he takes on the pokemon's appearance, stat boosts, stats, etc. Since he has the same stats as the other pokemon, holding a choice scarf almost guarantees you will outspeed the opponent, assuming no other issues. If your opponent uses several stat raising moves, then ditto can come right in and copy them. (since they used stat boosting moves, they can't have a choice item, otherwise they can't attack or baton pass them, meaning a choice ditto is free to attack.) Ditto can turn the tide of the game pretty quickly.