An electronic signature is an electronic record of an agreement.
Contracts have been used for a long time to show that two parties agree on something. Often these parties will then write a document that they both sign to show this agreement. In the times of the internet, many of these documents are transmitted in digital form, but showing agreement is still needed. That is where an electronic signature comes in.
The concept of electornic sgnature itself is not new. Common law jurisdictions have recognized telegraph signatures as far back as the mid-19th century, and faxed signatures since the 1980s.
Electronic signatures exist in different forms. All forms can show that somebody agreed with something. Some forms can also protect the data the person agreed with from being changed easily, or they can legally identify the person that agreed. To do this, ideas from public-key cryptography are used: digital signatures, certificates, and hash codes. An electronic signature often includes a timestamp to show when the signature was made. Much like cryptography, electronic signatures can be used for any kind of data, there is no requirement that the data signed has a specific format.
Even though cryptography is often used, the term electronic signature has a legal meaning. This is different from the technical term digital signature used in cryptography. Many countries have made regulations so that some electronic signatures are equivalent to a handwritten signature for many purposes.
There are different ways in which an electronic signature can be done. Many countries have standards as to what such a signature must look like. Examples for such regulations are eIDAS in the European Union, NIST-DSS in the United States or ZertES in Switzerland.