This depends on the broker. Many brokers will recharge the demo account with more virtual money if you run out. Check individual terms and conditions before you get started.