It depends when you were born - when I got my first computer, hacking meant circumventing security for the fun of it (or very rarely by criminals for financial gain) to gain access to things on a server / website (or to change things on a website / server) whereas cracking meant circumventing security in software you had access to (example, decompiling an EXE file to assembler and changing the assembler in order to get rid of the message that says your trial period has ended). People who exploited vulnerabilities in websites by using scripts they found on the internet were called script kiddies and the hacker community used to hate these people since they would typically deface websites or do some sort of damage which placed the hacking community in a negative light.
One of the banned books of the time included the little black book of computer viruses and the big black book of computer viruses which contained the source code for all the deadly computer virus ever made. You couldn't open this book or the included zip file on 'n windows PC as it would either infect your PC or make your antivirus go ballistic. Keven Mitnick also wrote a book which was considered a good book by the hacking community, The Art Of Deception (which went into a lot of detail on how a secure system can be compromised simply by exploiting the weakest link, typically the people who has access to it). For some of his new books, see: mitnicksecurity.com/S=0/shopping/books-by-kevin-m…
These days, hacking has been hijacked to mean creating something in a clever way, so even if you modify your Roomba vacuum cleaner or your drone to bring you coffee or find a way to fold your laundry in clever way, it's considered hacking. If you are coding something in a clever way, it would be considered hacking under the newly hijacked definition of hacking - creating something in a clever way.