The answer to this is very easy, habit. At first dressing up may take some trial and error, but everyone confidently finds their stride at some given point. Like riding a bike, you will fall off a few times and have to start over. Luckily in this example no one is getting injured except maybe your ego at times. Regardless, do not fret, this period of instability is short lived and long term rewards are perpetual.
Once you start getting used to dressing well for all occasions (be it casual or formal), your body will naturally adapt to the articles of clothing which you are bearing. That uneasiness which was ostensibly displayed by your body language when first getting used to a new style, gradually fades into the outward natural confidence of a body that has settled into a new and improved exterior.
Many of you are afraid of changing your style at the expense of being laughed at or made fun of for trying something completely outside of your dressing norm. You might be accused of trying too hard to impress someone, looking like a gender not of your own (applies to guys only) and many other lines which are uttered by jealous types who wish they had the ability and honesty to face the fact that they dress as if they were still occupying dorm rooms at their Universities, where flip flops, cargo shorts and loose shirts with college baseball caps were the usual.
March forward with courage on your new endeavor and ignore those trying to bring you down because of envy. Go on, dress to impress. Like a Boss.