Mapper is the user-defined program to convert the input split in (key, value) pairs as per the code design. Typically, Mapper is the base class that required to extend by the programmer to write their own logic according to the requirement. While extending the mapper, the programmer has to mention input and output type under mapper class arguments.
If you want to learn Hadoop, I recommend this Hadoop Certification program by Intellipaat.
Also, watch this YouTube tutorial on Hadoop: