DO NOT RUB IT. It's important to understand that despite our garments having a stain-resistant treatment, rubbing the stain will make it penetrate the fabric.
So, if you accidentally stain it, use a bit of water to slide the stain off the fabric and immediately remove it by placing a clean paper or cloth on it.
There are specific cases, such as oil-based stains, where you might need to apply a pre-wash stain remover on the garment before laundering.