I've known many people who thought themselves ugly and unlovable and I've known many people who thought themselves hot, gorgeous, and desirable. I've never met anyone, in either group, who was close to having an accurate self-estimate of their looks or their appeal.
Unless you have to throw towels over the mirrors in your house to keep them from shattering as you walk by, you're probably not as ugly as you seem to think you are.
You might want to Google " increasing self-esteem." See if some of the sites that turn up have some words in them that make sense to you.
As for your question, Charlie Boy and Airbender say it all. Men date women they're attracted to. If he asked you out, he did it because he likes you. There are no mysterious ulterior motives involved.
When in trouble,
Or in doubt,
Run in circles,
Scream and shout.