At one time or another, we have all dialed a wrong number. When you realize what you have done, do not hang up abruptly. This is rude and can be unsettling to the person you called. Simply apologize to the person who answered your call.
Also, it is helpful to repeat the number you dialed to verify the error was in fact a mistake in dialing and not an incorrect number in your records. You wouldn’t want to become a nuisance and call the same number incorrectly twice.