Another word for accosted is approach, detain, speak too and talk too.
Being accosted means that someone has approached you in an aggressive or challenging way and told you something that happened or to speak to you.
If someone approaches you in an aggressive or challenging way to speak to you or engage you in conversation to tell you something even if they are seeming to be nice then that can be accosted.
An example of being accosted is if someone approached you such as begging for money.
Some ways that accosted can be used in a sentence are the woman was accosted by police officers very shortly after she was seen shoplifting.
I was accosted by news reporters or I was accosted by survey people.
Being accosted does not mean the person that accosted you was mean but it's just when someone approaches you in an aggressive manner even if just to just make a nice chat with you.
Paparazzi are another group of people who's job is to approach people in an aggressive manner so they would be an example of being accosted as well.