Flashbacks constitute the literary device wherein the author depicts events from before the current part of the plot. Not only can you flashback, also called analepsis, you can flash-forward, known as prolepsis. There are three methods of achieving flashbacks: Character Narratives, Dream/Memory, Authorial Sovereignty.
Flashbacks are used to create background to the current situation, place, or person. You can use flashbacks to reveal details about a character that solidifies motives. The author can introduce different time periods to the present of the narrative through this mechanism. Flashbacks can foster empathy towards your characters through the revelation of good/bad memories of specific events, places, or people.
Flashbacks should contribute to a story and must propel the story forward. They should be used sparingly as the plot will become muddied and unfollowable otherwise. If you find they are too common, think about changing the time portion of the setting to the time where the flashbacks occur.
Be sure to use a trigger in the preceding paragraph to lead into the flashback and use a trigger at the end of the flashback to lead back to the present. This is a naturalized way of recalling memories that pop up. Think of the triggers as bookends to your flashback:
I tasted the strawberry ice cream for the first time in 12 years and slowly recalled my youth.
I was nine when I met her and it had been at the Summer Shack burger stand near the edge of the golf course. She had given me a kiss after I let her taste my strawberry ice cream cone.
Now, feeling the ice cream dripping onto my hand, snapped me back to the future.