You need as quickly as possible to contact the Bank. The sooner an error is detected, the greater the likelihood that the problem will be solved successfully. Not all operations associated with the transfer of money carried out instantly, sometimes it takes a few hours. If during this time you will have time to inform about the mistake, the Bank will return the money. You may return immediately, but postpone the operation, you will be asked to come with documents in the office and write a statement about the return of the inadvertently transferred funds. Perhaps your mistake will cost you fees, which the Bank will take the extra work, but the bulk of the money will be returned.
If the money went to the wrong account and was transferred to its owner, the situation is somewhat complicated. By law, the Bank in this case has no right without the consent of that person to withdraw funds from his account. So you'll have to deal with him. If you know this person, try to explain the situation to him and maybe he will agree to refund you. If you made a mistake in the numbers and don't know who owns the account, the Bank will not provide you with personal data, and will try to go to that person and negotiate with him.
If the owner of the account to which the money went, refused to accept their return, have no choice but to sue him in court. If the amount is small and not critical for the sender, it might be easier to forgive and forget, because court proceedings require time and money, and not the fact that you win the process.
Possible, and such a situation in which the money is spent on is not your fault, but by mistake the teller at the Bank. In this case, you need to contact the Bank with the statement that you all are correct, but the recipient of the money in time is not come. Having received such statement, the Bank must check and refund you without deduction of any Commission.