Virtual networks allow us divide a LAN (Local Area Network) into smaller sub-networks which are not always physical.
Consider a network where both students and teachers could use their devices as an example.
The students require access to the student section of the network, while the teachers require access to the staff sections. By using virtual networks, the cables and hardware can be shared, but the access is different.
In this example, the teachers are using the desktops & students are using either laptops or smartphones. Even though they are using the same hardware, the logged in users are logically separated because they have different profile types.
One important thing to remember is that because virtual networks share the same hardware, they are divided using the network software.
Because software is used to divide the virtual networks, this also has the added benefit that the boundaries of each network change depending on where a user logs in. For example, if a teacher uses a laptop, this will become part of the teacher virtual network.