This question or some variation of it comes up frequently. Many students have heard so much about how the Spanish of Spain (or Argentina or Cuba or fill-in-the-blank) is different that they're worried their months of study won't do them much good.
While the comparison isn't completely accurate, the differences between the Spanish of Spain and the Spanish of Latin America are something like the differences between British English and American English. People from throughout the Spanish-speaking world can communicate with each other as easily as people throughout the English-speaking world can. There are differences, more so in the spoken language than in writing, but they aren't so extreme that you can't learn the differences as you need them.
Also, while it's easy to think of Latin American Spanish as one entity, as textbooks and lessons often do, you should note there are differences in the Spanish of various countries in the Western Hemisphere. But again, the differences aren't so extreme that they prevent communication.
If your pronunciation is reasonably good, whether your accent is Castilian or Mexican or Bolivian, you will be understood. Latin Americans watch movies from Spain, and Spaniards watch Latin American telenovelas (soap operas), so you can be assured the differences aren't all that great. You might want to avoid slang or extreme colloquialisms, but standard educated Spanish is understood anywhere in the Spanish-speaking world.
Here, however, are some of the differences you may notice:
Pronunciation: One of the main differences is that many Spaniards often pronounce the z and the c before i or e like the "th" in "thin," while many Latin Americans pronounce it the same as the s. Also, speakers in some areas (Argentina in particular) often pronounce the ll and y like the "s" in "measure." In some areas, you will hear speakers drop s sounds, so está sounds like etá. In some areas, the j sounds like the "ch" in "loch" (difficult for many native English speakers to master), while in others it sounds like the English "h." In some areas, the l and the r at the end of a word sound alike. If you listen to a variety of spoken Spanish, you'll notice other differences as well, particularly in the rhythm in which it is spoken.
Grammar: Two of the biggest differences, each worth a lesson in itself, are the leísmo of Spain and the use of the pronoun vos in some areas instead of tú. Another major difference is that vosotros is often used as the plural of tú (the singular familiar "you") in Spain, while in Latin American ustedes is usually used. There are also numerous small differences, many involving colloquial usage.
Vocabulary: Other than slang, probably the biggest class of vocabulary differences you'll come across is in the use of suffixes. A lápiz is a pencil or crayon everywhere, but a lapicero is a pencil holder in some areas, a mechanical pencil in others, and a ball-point pen in still others. There are also a fair number of blatant differences, such as a computer being an ordenador in Spain but a computadora in Latin America, but they are probably no more common than the British-American differences. Of course, every area also has its quirky words. For example, a Chinese restaurant in Chile or Peru is called a chifa, but you won't run across that word in many other places.