Meaning of phrasal verb hit on in English

hit on somebody

(North American English, slang) to start talking to somebody to show them that you are sexually attracted to them

hit on/upon something

[no passive] to think of a good idea suddenly or by chance

She hit on the perfect title for her new novel.