An # 180 is when you have a name and both you and your board make a 180 degree turn and land fakie, that is, backwards with the tail of your board is now facing forward and your nose behind you.
An # 180 can be done by turning either frontside or backside. We will start with the frontside. When you crouch down to make your name, spin your shoulders in the opposite position that you want to spin. This would mean if you are a regular stance skater about to perform a frontside # 180, you will spin your shoulders to the right, goofy skaters, left.
When you make the pop of the #, you want to spin yourself and your board at the same time, pushing the front of the board forward with your front foot, and back behind you with your back one, and spin your body around with it .
The absolute most important thing to point out is that you need to stomp the board down for a landing the exact moment you are in fakie position, that is, the opposite direction. If you have ever played a skateboarding video game, like one of those Tony Hawk Pro Skater ones, you know what happens if you land sideways, like a 90 degree turn. You will eat the pavement. Hard. Do not do that. So as soon as you have made that 180 turn and are facing back, stomp the board down, bending your knee to absorb shock, and roll away.
As for the backside # 180, it is essentially the same thing, and while one skater will tell you that a frontside # 180 is easier or harder, another skater will tell you the opposite. So I recommend just finding out which one one feels more comfortable for you, and working on that one first, and tackling the other later. Just remember that on a backside # 180 to spin your shoulders the opposite direction that you want to turn when you are crouching down to spin yourself after the pop.