A patch is released just because there is vulnerability to the security of data within your store. The hackers keep noticing the releases of patches. So they come to know for what purpose the patch is released. Therefore they can target your store through that particular loop hole.
Therefore it is very necessary to install the security patches as soon as they are released. Otherwise your rate of vulnerability to hack increases.
What is a patch?
Patch is a set of codes that are replacement to the previously remaining codes. When a security concern arises the patent owner of the software product work on the codes that can be hacked and can damage the software. Therefore they make some changes to the codes which ultimately replace the previous vulnerable codes. Magento also does the same to eliminate the security risks of its different versions.
How to add security patches?
Sometimes applying a patch can breakdown your site. This is because of missing previous patches. So you should be very careful when applying a patch.
a) First create a backup of your store so that due to any mishap you do not loss the store setup.
b) Login to the SSH on server
c) Download the patch
d) Apply the patch
For Magento 1 apply in /data/web/public directory and for Magento 2 /data/web/magento2 directory.
The bash command will apply the patch to your directory
Here is the command “bash patch_name”