To "accost" someone is to approach them and talk to then in an intense, demanding way. The demand can be anything. For example, "the homeless man accosted me and asked me for money."
The word has a specific unpleasant connotation. It is a word that is often chosen when the "demand" is for sex.