Knocking (ping) in the top of engine passenger side and Im not sure what to do. on 2007 Mazda CX-7

A family friend said it sounds like a valve. Im not sure what that means or how much it is going to cost. 2 years ago, I had the turbo replaced at a cost of $3200 at the dealership.

Asked by for the 2007 Mazda CX-7