What you have heard is correct - historically, the GRE has been the requried exam for gradaute school and more recently, MBA programmes are accepting it as an alternative to the GMAT. As each programme has different requirements, you should check which exam(s) are accepted by the programmes you are considering.
The main difference between the two exams is the way that they approach assessment. Depending on your strengths and weaknesses, you can choose the exam on which you are likely to score highest. Some key differences are as follows:
The GMAT includes a section called Integrated Reasoning. Here you are asked to read and evaluate data, charts, graphics, reports, etc. The GRE does not incorporate a section like this. If you tend to perform well in pattern-finding and critical thinking exercises, the GMAT might be for you.
Depending on your strengths in language, the GMAT and the GRE place different emphasis in writting and reading comprehension. For those how have a good grip on English grammar (i.e. both understanding English syntax as well as being able to provide the reasoning behind it), the GMAT is preferable. The GRE, on the other hand, focuses heavily on vocabulary.
In terms of math, the GMAT places a greater emphasis on the ability to solve problems systematically. The GRE math assessment requires that you manipulate numbers quickly and accurately. Whether your strength is in systematic problem solving (GMAT) or general mathematic dexterity (GRE), you are likely to perform best on one or the other.
if you are not sure which categories you fall into, sample practice tests are readily available online. Regardless of which test is right for you, proactive preparation can greatly improve your scores.