In general, theft is taking something that is not yours without the permission of the owner. That very basic definition is at the heart of all theft crimes.
There is one more important aspect, though. According to FindLaw, to commit a theft crime, you need to have intent.
What is intent?
Intent means that you knowingly took the item. You meant to deprive the owner of ownership when you took the item. What intent is not is mistakenly taking something or taking something without being aware that you took it.
For example, you go to the grocery store and it is quite busy. At one point, you step away from your shopping cart to grab an item. When you return to your cart, you toss the item inside and continue on your way. However, a lady comes running up to you saying you took her cart, which had her purse in it.
You did not intend to take her cart or purse, and you did not touch or get into the purse. It was an honest mistake and oversight on your part. You thought it was your cart. There was no crime here. It was just a misunderstanding.
However, if you had gotten into the purse, saw it was not yours and took money from it, that would be a theft crime. You knew it was not yours and you knowingly stole the money with the intent of taking it from the owner.
Due to the requirement of intent, many defenses to a theft charge are to show there was no intent behind the actions.