Virtual work is a way to measure how much work is done by something or someone in a computer simulation or a mathematical equation. Imagine you have a toy car that needs to climb up a hill. You have two ways to make it happen, either you push the car with your hand, or you can use a string to pull the car up the hill. When you apply force on the car with your hand, you are doing real work, but when you pull the string, you are not physically doing any work, but the car still moves up the hill, and it is called virtual work.
Similarly, in a computer simulation or a mathematical equation, we can calculate the work done virtually by an object without physically applying any force on it. The calculation of virtual work is based on the principles of physics, such as the laws of motion and energy conservation. For example, if we want to simulate the motion of a car on a track, we can use virtual work to calculate the force required to move the car forward or to stop it. The concept of virtual work is essential in many fields of science and engineering, such as mechanics, robotics, and computer graphics.