transactions – What does bitcoin do that forestalls somebody from utilizing your cash by simply producing a key pair and saying “you” despatched these cash?

I believe I am lacking and understanding concerning the present technique of how your pockets works and the way the transactions are signed.
For instance, if I am consumer “A” and there exists a transaction from consumer “B” the place I obtained 10 BTC that has been written right into a block. Then for me to make use of it I simply generate a random public/non-public key pair and signal the transaction with the non-public key.
What’s stopping consumer “B” from producing a public/non-public key pair then creating and signing a transaction saying that I, consumer “A” despatched them 10 BTC?
I’ve learn that some pockets implementations generate an inventory of public/non-public key pairs that may someway be related to the pockets tackle? I am unsure how this could come into play if so or if I am misunderstanding this bit of data.