Xcode projects open in background
So, I got this computer in June of 2018, and have taken great care of it. It has a plethora of random issues such as screen freezing, display in black and white, and quite a few other display issues. But that's not the issue. I came home from school and picked up my computer to check my grades. But when I picked it up, it was, abnormally warm. I checked activity monitor and it told me that my folder/project I am using in Xcode was open. Xcode was closed, and yesterday when I went to sleep, no applications were open. I quit the process and my computer has since cooled down. Does anyone know why this happened, and if I need to close Xcode in any particular fashion? Sorry if this seemed rushed, I have homework to do. Yay. Anyways, all answers appreciated. Thanks
MacBook Pro 13", macOS 10.14