VirtualProtect, changes the protection options (i.e. the way application is allowed to access the memory) of some memory region already allocated with VirtualAllocate or other memory functions. There are many protection options available - readonly, readwrite, execute, all of them etc. Check them in MSDN.
As a rule, when the memory is allocated, it has some of these protection options assigned. But if one wants to change them later - VirtualProtect is the function he need to use.