A virtual class essentially allows you to reuse styles from an existing class, usually one from another block that you have already created on the current page.
A global class is more flexible and isn’t specific to the current page.
Aside from those considerations, in terms of what they actually do, they are similar in that they provide styles from another class to the block you apply them to.