How do I know when to replace/maintain the crank?
There are two cranks or crank arms on a bike - they connect the bottom bracket to the pedals.  Some bikes have a "one piece crank" which combines the functions of the cranks and the bottom bracket axle.

There are four things that go wrong with crank arms

1 The threads for the pedal get stripped/damaged to the point the pedal gets undone easily

2 The mating hole for the bottom bracket fretts and is no longer a good fit.  This often produces a creak on the power part of the stroke.

3 Cracked crank arm - if the mating hole wears, and is retightened enough times, the crank arm slides too far onto the bottom bracket.  With time this can crack the weakest part of the circumference at the BB end of the crank.  This can also happen at the pedal end, but that's unusual.

4 Bends and twists due to impact or accident - this is quite rare because crank arms tend to be very strong, much stronger than frames.

If your problem is the Bottom Bracket, then that's a whole different set of answers.  Grinding could be bearings (check for play in the bottom bracket axle) or it could be a bad chainline, so the chain may be dragging on the front mech cage and your shifter wires need a tweak.