Apple - Is there a task manager for OS X El Capitan?
The OS X equivalent of Windows Task Manager is Activity Monitor, located in /Applications/Utilities/, or type Activity Monitor in Spotlight.
See Activity Monitor's internal Help: Activity Monitor > Help > Activity Monitor Help
For more information see Apple's Support Document: Use Activity Monitor on your Mac
Also, as mentioned by klanomath, for more specialized scenarios there is Instruments in Xcode. (Xcode > Developer Tools > Instruments)
Help for the Command Line version of Instruments, in a Terminal type: man instruments
Or see Apple's Instruments User Guide.
In a simpler way, you can also use the UNIX command top
which you can enter in a command line to show the top process eating your memory or CPU.
To sort the process my memory usage, just use top -o MEM
and if you want to sort the process by CPU usage, you can use top -o CPU
.