Iphones are synced together?

My friend purchased an iphone and i synced and started it on my laptop, i was receiving all her imessages and if she downloaded an app, i would get it too? We both logged out of my icloud, and she doesn't receive my imessages, but sometimes i get hers, and if i imessage her, i receive it?

Go to settings then find messages then scroll down a bit and find send and receive, it should come up with your number/email and hers. If you click hers it should untick.