First of all, SHA stands for Secure Hash Algorithm, while MD5 stands for Message Digest. These are hash functions for standard cryptography meant for providing data security for the authentication of multimedia. The United States National institute of standards and technology is the body that is responsible for developing the secure hash algorithm (SHA), which is a family of hash functions for cryptography.
On the other hand, the message digest (MD5) happens to be a ubiquitous hashing algorithm that is used today in several internet applications; and it was developed by Ron Rivest. It can be used to make a value string of 128 bit from an arbitrary length string. SHA can also be used in various applications like SSL, SSH, IPsec, and S-MIME (which means Secure or Multipurpose Mail Extension). The secured versions of SHA-1 include SHA-512, SHA-384, and SHA-256. MD5 has experienced more attacks compared to SHA-1.