If something is stuck in your eye, try blinking and flushing it out with cool water. Make sure to wash your hands before touching your eye and attempting to carefully remove the particle; if it's a large object, leave it where it is and see immediate help.
For chemical burns, turn your head, so the injured eye is down and to the side, flush your eye with cool water for 15 minutes and try to carefully remove your contact lenses. You should then seek immediate help.
The best way to avoid eye emergencies is to be extremely careful! Use protective eyewear during sports or activities where debris or contact could cause damage, and always avoid placing sharp objects near your face. If an accident does occur, visit your optometrist or local emergency room.