Trackstands are the most fundamental of flatland tricks. If you are just getting into flatland, this trick is a must as it will lead your progression down the road. The better you get at this from the beginning, the better off you will be. You can learn to scuff these and then learn to coast them as well.
To do this trick, practice it first by stepping into it at home on your carpet. This will allow you to bail much more safely when you forget to grab the brake after a scuff and lose it forward. It's essential to try and keep the frame as vertical as possible. Once you get good at home, take it a bit further by taking your one hand off the seat and bars and stand up. Standing up straight is very important. Also try and keep your center of balance over the front tire. This of the bike as an extension of you. Balance with it, not against it. Practice, practice, practice. You can also jump around on the pegs and switch sides, etc after you get it mastered. Pictures coming soon.