Copy on write,basically implies that when a fork is done, it is assumed that the parent's VAS is copied to the process, but it is not the actual case, as if it was like that, it would be creating a havoc both memory wise and time wise.
Hence, as the name suggests, copy on write creates a virtual page, and when someone tries to write to it, only then it copies the data to the process context, else it is in read mode.
Suppose we have a variable g, which is assigned some value, when we try to alter it, then only the copy is done.