The so called virtual memory also known as Swap on Linux or Pagefile on Windows (as already mentioned by @
rudra) is simply either a file or partition on the disk of the computer or server. It acts as fake RAM to let the system unload rarely used information from real RAM to make space for new information. And of course as also already mentioned by @
rudra it allows the operating system to function once the real RAM has been fully used up.
However since a HDD or even most SSDs are a lot slower than real RAM the performance of a system that is using virtual memory to survive is horrible. The disk cannot keep up with the CPU and the CPU has to wait for it and this in return causes very high CPU usage. We all know what that means... a very laggy system with bad response times and horrible performance. Not even NVMe SSDs are fast enough to compare to real RAM (2 - 3 GB/s on NVMe SSD vs easily 15 GB/s or much more on real RAM).
There is no performance or speed gain from using virtual memory! It actually only makes things worse the more you use of it as explained above. Talking about SSDs. Don't use SSD space for virtual memory. If you use virtual memory very often you will kill your SSD because the writes to the virtual memory will wear down the SSD a lot quicker than normal usage such as storing the OS and important programs.
Back to the main question. I can somehow remember you asking this in the past already somewhere (probably in the support forum). I even remember that I pointed you to tutorials that explained how to enable and add Swap on a already installed Linux OS.
See here:
https://help.ubuntu.com/community/SwapFaq (go down to How do I add a swap file?).
You cannot really add Swap to OpenVZ VPSs! Only the provider can enable and add vSwap from their side. You need atleast a KVM VPS. Don't bother around with OpenVZ in this regard.
P.S.: The Ubuntu (Community) Wiki is one of the greatest resources to learn things about Linux. Many things you learn there can be applied to many Linux distributions outside of Ubuntu or Debian.