Lets first understand what is the meaning of profiler in general term?
A profiler produces a performance profile, i.e. how much time is being spent in the subtasks of the task you are profiling. 'perf' tool in unix is one such example which tells how much time is being spent in each of the particular system and applications etc etc.
Now lets see MongoDB profiler -
The MongoDB profiler is similar to profiler in general term, it gathers performance information about slow interactions with the database, and provides hints, such as available index choices.
Check the following link which explains how to use MongoDB profiler -
https://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/