Do I need to replace my chain ring and cassette? Images attached
The idea is that chain force causes wear on the edge of the upcurve of the U-shaped gap between each gear tooth, eventually eroding the tooth profile so much that it becomes V or shark-tooth shaped in extreme cases (instead of flat-topped).  The gear gap where the chain roller sits is then much wider than the roller itself, and the gear tooth is much narrower than the gap between rollers, so the chain can have slop and even slip on the gear, causing problems.
Steel gears will normally wear more slowly than alloy gears, and chainrings (front) will normally wear more slowly than rear gears of the same material.  The chain roller connections will also wear (this is called &quot;stretch&quot; but is just wear making the chain looser). Normally, chains get replaced more often than rear gear cassettes, which in turn get replaced more often than chainrings, but it will all vary with the materials and riding style involved.