Explain sort() function

Please explain sort() function, what its argument specify.
And why the data type of the function given to sort() as 3rd argument is bool.

@poorva2145 Refer this https://www.geeksforgeeks.org/sort-c-stl/