I accidentally poked my eyes with a pencil. Should I just lie down or go to the doctor?

See a doctor ASAP. Any injury to the eye should be evaluated by an eye doctor. There can be damage both from the sharp point of the pencil as well as the force of the pencil hitting the eye. Each has to be treated differently. A doctor should also check that no parts of the pencil became lodged in the eye.
Go to the Doctor! Poking yourself with a foreign object may result in an abrasion of the eye, but may have more serious consequences. It is best to see you eyecare provider for an evaluation.