I was taught how to track stand on a fixed gear bike by some velodrome riders and here are some pointers they gave me that really helped me.
Keep your pedals roughly horizontal, and turn your front wheel about 45 degrees towards the side that has the front foot. Most beginners don't do this, they move their wheel left/right in an attempt to stabilize the trackstand. While this may work temporarily, it is very bad technique and you won't be able to progress to long seated trackstands like this. Assuming you ride on the right side of the road it is good to learn with the wheel facing left, so that when you get better you'l be able to utilize the camber of the road (you want the wheel pointed uphill, which will be left if you're on the right side of the road).
Learning on slight hills is definitely a good idea, but not necessary if you're on a fixed gear bike. I learned to trackstand by not thinking about just stopping and balancing, but focusing on riding into the trackstand. as the pedals approached the horizontal position, I would slow them down, and I'd try to stop with the front pedal slightly higher than the back pedal, this gave me slightly better leverage. Now the important thing is to not rely on turning the wheel right if you start falling over to the right. Use your center of balance to overcompensate to the left. If you see you're constantly falling right, lean more left, and vice versa.
Another very important thing to remember while learning is trackstanding is not about standing perfectly still when you're learning, its about forward and backwards movement. If you're on a fixie, alternate putting a tiny amount of pressure on the front foot and on the back foot. You will be rocking back and forth (quite a bit at first), but as you get better you will minimize these movements. On a freewheel the gravity provides the backwards motion, so you apply pressure on the front foot, then let off slightly to rock back. This rocking motion is critical in acquiring the right balance. Again, you should NOT be moving your wheel left-right. You should be using your center of balance for left-right balance, and rock forward and backwards for forwards/backwards balance.
Practice is key, eventually I reached the point where I could confidently trackstand sitting down with my hands not on the bars. Re-learning how to trackstand on flat ground on a freewheel is proving to be tough, i'm using the brake to provide a tiny amount of back pressure against the forward pedaling, but havn't been able to maintain it yet really. Hills are cake though.
Good luck. sorry for the wall of text.