The word "cocky" is a negative way to describe someone who has too much confidence. They think that they can't make any mistakes.
Here are some examples:
Don't get too cocky. The game's not over yet!
He has this cocky attitude, like he thinks he's so handsome and charming. I can't stand it!