It's mechanical. Depending on the quality of the particular hard drive in question it can have a life Span of anywhere between a week to several years.
Besides the fans, the hard drive is the only component in a pc that never stops moving while the pc is on. It's just like, in a car, you'll have to replace the belts in the engine several more times than say, the brake lines, cause the belts move and wear down.