Is there a way to reduce eye strain when using the computer?

Yes. There are many different things that can cause headaches so the first thing to do is to make sure that the eye strain is the reason. Musles inside the eyes contract when near work (like reading) is being performed. Prolonged periods of such contraction can lead to eye strain and headaches which can radiate to the temples; glasses can support the muscles so they don't have to work as hard.
Yes. Our eyes are designed to see things in 3d. When you look at a computer/book etc for a long time (a 2d surface) you can strain your eyes or get dry eyes. Every 20 minutes rest your eyes for 20 seconds by looking at something at least 20 feet away.