A few weeks ago I bought a used Macbook Pro Retina and I've been having severe issues with it since. The first thing I did when I bought it was to upgrade from whatever version of OSX it was using to El Capitan. During the install, it crashed several times and took many hours to do anything, and since then it's been really slow in all applications, struggling to even run Chrome and browse web pages.
Inspecting the Activity Monitor at this time, I found that a process "kernel-task" was apparently using some 300% of my cpu (how is that even possible?) so I promptly booted into the disk manager and did a full reinstall of El Capitan from a bootable USB, however the issue still persists over a week later. Although the "kernel-task" process has disappeared, idle CPU usage is still above 80%. I dont believe this to be a software issue as the reinstall I did didn't fix anything.
Another possibly related issue that I'm having is whenever I plug in the charger while the charger is connected to the wall, the laptop turns off. I bought a new charger and the problem still persists.