Depends. If it's someone younger, like age 17 or younger, I'd be very alarmed and would call the cops/CPS because they're likely abuse victims themselves. Perhaps they were abused and now they have a very warped view of relationships, and they're coming to me confessing this because they know it's wrong but they don't know what to do. In this situation, I would remain optimistic that they aren't actually pedos, just very damaged kids that can fixed and eventually move on from this.
Or, maybe they have a flavor of OCD that makes them have very bad intrusive thoughts (e.g "I can't stop thinking about pedo ish, therefore I must be one"), if that's the case then that can be cured with therapy. Again, I would be optimistic that this is a situation where they could be helped.
If it's someone older and set in their ways, and not suffering from some other severe mental or developmental illness (OCD or sudden schitzo symptoms), then I'm going to cut them out of my life, warn my other family members, and call the police. Yeah they can't do shit about someone just thinking bad thoughts, but at least they can have a papertrail for when the pedo eventually commits a crime.