If you are using a virtual card, the stored information can usually only be charged once. So even if a hacker gets access to the card number, it is useless for his purposes. The EMV chip found on the majority of contemporary credit cards functions similarly to this technology. To avoid the storing and unauthorized use of static credit card information, both generate a new token for each purchase.
Virtual credit cards are not the same as mobile wallets like Apple Pay and Android Pay. However, they work on a similar basis. The merchant verifies the transaction with a limited-use token when you provide a card through a mobile payment app. Not an actual credit card number. Just like with a virtual credit card. The main difference between the two technologies is the way they are used.
At the moment, mobile payment applications are mainly used in brick-and-mortar retail stores. However, many online stores are starting to accept Apple Pay and the like. Virtual credit cards, by contrast, are mostly used exclusively online.
Thus, while both technologies work primarily to make payments more secure, the environments in which they are used differently.