When refering to a person, it generally means unattractive or unpleasant, either physically or mentally.
Whether a person is ugly or not, is really a matter of opinion. There is no set of characteristics that makes one person ugly.
Guy 1: Haha, your girlfriend is a size 12 and has a big nose. She's sooooooo ugly!
Guy 2: Haha. Your bitchy girlfriend just kicked a puppy. She's sooooooo ugly!