Let me answer this as briefly as possible:
As you no doubt know, the GRE stands for Graduate Record Examination.
Any fundamental queries regarding the exam would be answered from their home site www.gre.org. I recommend that you take a through tour of the site.
As the name suggests, people who take the exam are usually, though not limited to the Undergraduate section of the student community. Anyone who decides to pursue a Master's or Doctoral course in the United States of America would have to take it up at the earliest.
The exam is meant to measure the abstract reasoning skills of the students who have completed or are pursuing their undergraduate degrees to a reasonable extent. It is also supposedly a good indicator of the performance of the student in her first year of graduate studies.
This will require a comprehensive answer which I will be posting later.