It helps to see more context:
Penny: [on phone] How about this: you keep him there a little longer, and when you get to the party, I'll point out which of my friends are easy.
Howard: [long pause] Don't toy with me, woman.
Penny: I've got a hot former fat girl with no self-esteem, I got a girl who punishes her father by sleeping around, and an alcoholic who's two tequila shots away from letting you wear her like a hat.
(source)
Penny says she has friends who are "easy", meaning they are sexually active and not discriminating about who they sleep with.
Howard questions whether this is true.
Then Penny gives descriptions of three of her friends to prove her point.
"Sleeping around" means having many sexual partners.
"Two tequila shots away from letting you wear her like a hat" isn't an established idiom, just something the script-writers thought was a clever way to describe someone who's willing to have sex because of being very drunk (I'm not sure I agree with them).
I could understand the meaning, but couldn't understand the structure of this sentence.
"I got" is a shortened form of "I have" or "I have got". The structure is the same as "I have a dog and a cat" except the two things she has are described with long phrases rather than simple nouns.
Edit
In comments, there have been several possible meanings suggested for the phrase "wear her like a hat":
- It refers to sex.
- It refers to vaginal sex because "hat" is slang for a condom.
- It refers to cunnilingus (aka "face-sitting").
- It just means she'd allow him to do whatever he wants.
I think this wide variety of interpretations itself suggests the phrase is not a widely established idiom (It could be established in some communities, but not across the English-speaking world, and it might have different meanings in different communities)
It is a metaphor, and it does have a sexual meaning, but it's up to each person to determine for themselves what the exact meaning is.