Embezzlement is the the dishonest appropriation of entrusted property.
Sometimes, it is tricky to distinguish between embezzlement and theft. The key difference is that, with embezzlement, the accused was originally trusted to deal with and account for the property/money in question. This can be as trustee, agent or factor. The concept of exceeding authority is important.
For example, a shop worker may be trusted to undertake “cash handling” duties, which require them to take money from customers, store it in the till/safe, then account for the money at the end of each day’s trading. No issue arises from the worker’s possession of the money, until the point at which the worker decides to slip a tenner into their pocket in order to buy a chippy on the way home. That would be embezzlement of £10.
On a slightly larger scale, here is a recent example of £70,000 being embezzled by a church treasurer.

It doesn’t matter what the accused’s purpose was, as long as it was dishonest. This includes scenarios where money held in trust is “diverted” to an unauthorised purpose, regardless of what the purpose was. For example, if I take money from my employer to buy food for the homeless, in the knowledge that I did not have the authority to do so, I would be guilty of embezzlement.
It also doesn’t matter whether the “borrowed” funds were later repaid. In other words, the accused does not necessarily need to have gained anything.
“[T]here was undisputed evidence as to the significant amounts withdrawn and the frequency of these withdrawals, pointing, in the absence of any bona fide explanation, to a dishonest intent. It was undisputed that the funds were withdrawn and used for the appellant’s personal purposes of gambling and speculative investment – a use which was consistent with an intention to deprive the company and through it the other shareholder of the monies withdrawn.”
If somebody is charged with embezzlement, but the Sheriff/jury does not believe that they were in a position of trust, they can be convicted of theft instead – it is an “implied alternative” charge.