Firstly, comb your hair neatly. If any tangles are left, it will become difficult to tie a bun.
Tie a pony at the side of your head, where you want the bun to be. Now, divide it into two parts and twist them bringing it close to the scalp.
Pin these two buns and use a hair spray to hold on the bun and to not let go of the messy look.