Your eyeballs are not controlled by you. You should go to the hospital to have a check. The invisible bacterium in the eyes may cause this. If they get longer time in the eyes, they may cause the eyes to get infection and inflammation. You'd better go to see the doctor and have a full check.
According to your description, it seems like saccadic eye movements but it is also like eye twitches. Saccadic eye movements is normal and can happen to everyone. And eye twitches is also very common to everyone. It can come and go itself. And eye twitches can be result of tiredness, stress, allergies, drinking too much alcohol, intake too much coffee etc. Anyway, it is not a big problems.
Your eyes shake side to side is because the of necessary eye movement. When your eyes are attempted to focus on something, your eyes will automatically shake side to side to track objects smoothly. This eye movement is called saccadic eye movement. But if your eyes jumps or skips or overshoots the object, it is a sign of vestibular problem. If you have this kind of problem, you will have balance issues, vertigo or nausea.