Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
Im guessing this is because your computer lags. In random battles, the computer has to generate random pokemon with random moves, so it will cause more lag.