Find a language partner. If possible, find more than one language partners to speak with, or join a Spanish language group. Get used to different voices, accents, and slang by exposing yourself to speakers from different countries. If you only practice with one person, you will get used to the way that person speaks. Try to push yourself out of your "comfort zone," and challenge yourself to interact with more Spanish speakers. This will help your ear more quickly adapt to new speech patterns, and prepare you to communicate with people you don't know.
Watch Spanish language TV stations and moveis. If you are a beginner level, watch films or TV in Spanish and put on Spanish subtitles. This way you can correlate what you read with what you hear. You can also watch children's shows and movies or news segments, as these types of media feature clear standard speech with minimal regional accents or informal slang terms. As you advance, listen to the radio, podcasts, and music in Spanish. This will challenge you to listen to and understand the content of the Spanish words without the context of the action on the screen as in film and TV.
Study in a Spanish speaking country. Choose a largely populated cosmopolitan city such as Buenos Aires, Mexico City or Madrid. Living and studying in such a place will give you the opportunity to speak with people with many Spanish accents. If you are immersed in spoken Spanish and need to use it in your daily activities, your listening skills will improve much more rapidly than if you attend class or language exchange a few times a week.