Sounds like possibly some sort of an option in accessibility settings might have been enabled (like switch control or something like that perhaps).
That is of course if this isn't related to some type of damage in some way (like the phone falling down or something else of that nature).