Just cut off the stem with the pineapple on top, at the base where it arises from the leaves, carefully, so as not to damage any other growth, or just above the leaves a bit lower down on that stem. Although the main mother plant will die within a few weeks, if you take care of it properly, it should produce new growth around the edges, although as it is in a pot, maybe not so much as it would in the ground. All fruits from plants are technically seed cases of one type or another, and each will, if not picked and eaten, shrivel and die back, which is what's happened to your pineapple fruit. Info and care instructions here: What to Do to a Pineapple Plant After Picking the Pineapple.
On closer inspection (following your comment) I can see a darker, slightly shrivelled area on the stem holding the fruit, about halfway up, with white spots which look like maybe mildew or mould. I also see tiny white specks on top of the lower leaves, they might just be dust or something, I can't tell, so inspect the whole plant thoroughly. Either way, remove the stem with the fruit at the base, where it joins the rest of the plant, since it clearly has a problem anyway.