No. Coding is just typing directions for a computer while hacking is writing code to find loopholes in a website or organization. The two main types of hackers are white hat hackers and black hat hackers. White hat hackers hack websites to find loopholes (with permission) and the company (white hat hackers are mostly employed in companies) who owns the website fixes it.
Black hat hackers find loopholes in websites and hack them for malicious reasons. Maybe it’s to take the site down, maybe it’s for another reason. Either way, it’s illegal and you can get in jail for it.