Yes they do need trimming on occasion. Mostly will depend on a couple of factors. Ground conditions. They will wear if the ground is harder, gravelly as opposed to wet soft ground. Feed is the biggest factor. If they are fed too high a protein feed, they often will grow more. Some will grow more than others. Just like a goat or sheep, some seem to grow faster/longer than others in the same pen. Genetics have a play in it too.
GB is right. Most of the dairies have a hoof trimmer come in, they use a tilt table. Cow gets straps around her in a chute like catch; table tilts up and they use a pair of snips to cut off long pieces and a grinder to smooth and level them. Some cows do it okay, some hate it. They will seldom stand on 3 legs like a horse will. We have one that has one toe that grows real long. We take a pair of "loping" shears that you trim small branches off a bush/tree, and just cut the long piece off while she is in the head catch and all 4 feet are on the ground. Not fancy, but we get enough off to give her some relief from the awkwardness of the one long toe, and she can walk more normally. Have had the vet trim it and he said it is just one of those things. There is no excuse for a cow to get feet so long that it hurts her to walk. The loping shears do a good enough job to give some semblance of evening the toes to match and are not rocket science. There are some that are trimmed for show and such, but everyday stuff is just about helping them to have a reasonable base and for them to keep them worn down naturally.
One reason that dairy cattle need their feet trimmed regularly is the concentrated feed they get. Another is that they spend so much time on concrete that the feet don't wear down like in a natural setting. They often will get more things like warts between their toes, and foot rot is frequent from the constant contact with urine and manure that is more concentrated on the concrete. We take them away from the way nature intended them to be, feed them feed that is more concentrated than they "need" for their body to survive because we want more production, and we add to their problems.