Good news!  One of my poems has been selected for the Norwich Writers' Circle competition anthology, which goes to show that if you send a story or poem off to a competition and it doesn't win, it isn't the end of the world.  Only one entry can win, after all, and that doesn't mean that the rest of them are rubbish.
    If the judges offer any comments, go over your work again, bearing them in mind, and make any changes you feel are appropriate, then select another competition and send it out again.  Taking a look at previous winners, and, if the competition's run by a publication, at what they usually print may be helpful.  If someone different judges the competition each year, they'll no doubt be looking for different things. In any case, it makes sense not to enter the same work into the same competition in subsequent years.
    When the judge is named, doing some research might give you a clue as to what will take their fancy.  There are also some people who crop up as judges in many competitions.  If they didn't pick your entry for one competition, they're unlikely to pick the same piece for another.  Here's where it pays to read what they've chosen to win other competitions and any adjudication comments they may have made.
    Not all competitions name their judges, however, and some have a panel of readers to whittle down entries to a shortlist, which means that entering a competition can be like buying a raffle ticket.  Ultimately, all you can do is enter the best work you have and keep your fingers crossed.  The odds are that eventually you will be a winner.