The first thing you want to have dialed down is a bunnyhop. A 180 is basically a bunnyhop with a half twist in it so that first part is very important. You dont have to be able to get the height of a pro but the more comfortable you are with it the more it helps.
A good way to learn it at first, and get comfortable with spinning, is doing it on a ramp or a slope. This way when you do get the full 180 degrees you are facing down the slope, and can ride straight forward. Otherwise, you going to have to fakie out of it, meaning your going to be riding backwards for a second or two, and this can be tricky to get the hang of.
Now when you go to do the 180 you want to pull up on your handlebars and push off with your legs, just like a bunnyhop, except what your going to do is push to the side a little bit, and kind of get a twisting motion started with your legs. Now you want to look around with your head and spot your landing, this will help you land and also help to give you the twisting motion necessary to complete the move.
When I first started trying 180s I did so on flatland, but I would slow down to almost nothing and then do it, that way I wouldn't have momentum pushing me backwards and forcing me to fakie out or die. Then when I got more comfortable with it I went at faster speeds and started getting comfortable with the fakie.
If you guys have any questions or comments feel free to post :)