Most importantly, make sure your hands are clean (wash them with soap and water) and dry. The best thing to do is: - take your top eyelid by gently holding your upper eyelashes and pull that top lid over the bottom lid, then very gently rub. This is the most effective way to get a foreign body out of the eye. If you do need to rub your eyes, do it with minimal pressure and try rub on the sides of your eyes rather than the front of your eyes where your cornea is.
It's always a good idea to keep saline solution in the house - or a good lubricating dry eye spray in your first aid kit - both of these can be used to flush out anything in a safe way. But make sure they're in date when you use them!