The human visual system is not designed to focus at near point for long periods of time. This includes reading, computers, and anything else requiring long periods of close work. In order for the eye to focus at near point, the muscles surrounding the lens contract, distorting the shape of the lens so that visual input focuses at the retina (rather behind it). The ability to shift focus from near to far can be called "accomodation". When the lens doesn't shift focus properly, it's called "accomodative spasm". You don't want this. In some cases, it can be relieved with visual therapy. In other cases, long periods of close work, particularly when young, can result in permanent myopia (near-sightedness).
Computer glasses alter the focal distance, so the muscles of the eye don't have to contract as much to reach the proper focal distance at near-point. The relaxation of the muscles can result in headache reduction. Computer glasses differ from reading glasses, as the focal distance for a monitor is normally farther away than the distance of a book. They can reduce, and even prevent, later myopia (in addition to any immediate benefits). These glasses should be prescribed by someone who knows what they are doing, which is not always the case in vision care.