Thanks for your interesting question about amber. This substance, ancient tree sap, is preserved in sedimentary rocks that formed in a terrestrial (rather than aquatic) environment.
In certain places, sedimentary strata that originally formed above sea level (some of which contain amber), have been pushed--by various geological forces--below sea level. Suppose an amber-containing formation is currently exposed on a shoreline. Wave action and other forces weather away that rock body, leaving behind tougher residue, such as amber.
Amber is generally less dense than water, so it floats. Therefore it sometimes washes up onto beaches, where it can be found by people who know what they're looking for--kind of like finding "sea glass" (polished pieces of broken glass) on beaches in our area.
Amber can also be found on land, in areas where it's preserved. It can be recovered by carefully surveying the surface of the ground, by sieving, or through small-scale mining operations.
I hope this answers your question. Amber is really cool stuff, particularly since it's a great source of fossils, particularly those of insects (which got trapped in the originally sticky sap).