If a recipient replies to an outbound SMS, the reply SMS record will be attached back to the contact or lead that the outbound SMS was originally sent from, and the SMS will be assigned to the user that sent the original SMS.
However, if a customer sends in a SMS without first receiving one from you (i.e. an unsolicited inbound SMS), an SMS record will be created and it will be assigned to the user that was configured in the Setup and Configuration page.
On top of this, if there is an existing contact that matches that mobile number, we will link the SMS record to that contact, account or lead.