There are many things. It always depends on the person. Sure everyone talks about looks but many people overlook a huge factor -
personality. If a person has certain characteristics, for example kindness and ability to demonstrate respect, it goes a long way. Sometimes, though a person may not be model material, their amazing personality makes them attractive. The other traits that are often noticed are confidence and being able to be a smooth talker. Those help too.
But of course attraction is very subjective and everyone is attracted by different things. Personally, attraction comes with getting along with the person. You know ~ when you just 'click'...