For many people, staying focused is not easy. However, there are many ways to assure that you remain on track whether you're working for a job or studying for school.
For starters, you can keep food at your desk to help you focus, turn off your phone to avoid any unnecessary distractions, and get a quality chair so you're comfortable while working. Some other tools you can use are timing yourself to see how much you can get done in a certain amount of time, shutting off anything you aren't using to avoid any other distractions, clearing your desk to give yourself a cleaner working space, putting on music to help yourself focus, and by making a list of tasks to get done during your hours of work.
It also may help to frame a picture of your goal to remind yourself what's important to you while working. Also, it may improve your focus to have your pet around while working.
All of these tips will allow yourself to be more comfortable working for longer periods all while staying focused on the task at hand. After reaching your goals as a result of staying focused and working hard, you can reward yourself in ways such as shopping, vacations, and spending time with friends and family. All in all, these tips will sharpen your attention span and allow yourself to get work done more efficiently.