Pinning: what the research shows
Pinning is the tendency of a price to finish near a strike on expiration day. Ni, Pearson and Poteshman (2005) found that stocks with listed options close near strike prices on expiration Fridays more often than chance would suggest. Golez and Jackwerth (2012) found a similar effect in S&P 500 futures.
One mechanism: dealers who are long options near a strike are long gamma, so they sell as price rises above the strike and buy as it falls below it. That hedging leans price back toward the strike (Avellaneda & Lipkin, 2003).
Pin risk is something else
Pin risk is an option seller's problem, not a price pattern. When a physically settled option, such as a stock or ETF option, finishes very close to its strike, the seller cannot be sure whether it will be exercised. They can wake up on Monday with a stock position they did not expect.
Example: you sold a $50 put and the stock closes at $50.02. Most holders will let it expire, but some may exercise after the close. If they do, you are assigned and own 100 shares per contract. Cash-settled index options such as SPX settle in cash instead and carry a different risk: the settlement price is set by a specific auction or opening print, which can differ from the last price you saw.
After expiration
When contracts expire, their gamma leaves the book. If the expiring exposure was positive gamma, its hedging was leaning against moves and that support goes away. If it was negative gamma, an amplifying force goes away.
Caveat: the effect depends on the sign and size of what expired and what replaces it. High open interest marks a strike worth watching; it does not prove that price will be pulled there. Check the actual expiration calendar for the product, since weekly, monthly and quarterly expirations overlap.