Credit Karma has some good advice on how having an account in collection can affect your credit score, link here.
It’s possible for this to happen with identity theft, if you never got the bills and if the creditors completely dropped the ball in giving the imposter credit. (It might be relatively easy to track down and prosecute the imposter unless it is overseas and you have a very careless or reckless lender.) It might happen by being mixed up with relatives.
If your credit score was high, than a previously unknown collection account could impact your score more. Paying the debt does not immediately improve your score.