There are several potential causes of your symptoms. Probably the most common thing is that you may be suffering from eye strain. This commonly occurs in people who perform long tasks such as staring at a computer screen all day. If, for example, you notice that the problem occurs only after a long day at work,this is probably what is going on. In addition to taking regular breaks from work, other things that often help this problem can include using good posture, using an anti-glare screen on your computer monitor, and the like.
However, you should also see your eye doctor
for an eye examination. As we age, sometimes our vision changes and we no longer have 'perfect vision.' One of the most common causes of eye strain or trouble focusing is actually the development of mild nearsightedness.
Your eye doctor will be able to perform a full eye examination to help determine if you might need corrective eye wear for your vision. They will also be able to screen you for rarer and more serious eye conditions which could be causing your problems.
In general, it is recommend that everyone should have a full eye examination about once a year, even if they have 'perfect vision.' Good luck!