One, to bring about regime change in that country by making the North Korean people suffer so much economically that they either revolt against their communist regime or support a military coup that brings a pro-U.S. regime into power.
Two, to induce the North Korean communist regime to do what U.S. officials want them to do. The idea is: "Do what we want you to do and we will stop hurting your citizenry with sanctions. Don't do what we want, and we'll keep squeezing your people with ever-increasing sanctions."
It has never worked. In fact, no matter how many different forms of sanctions have been imposed on North Korea, no matter how cruel and brutal they have been, and no matter how much suffering they have generated for the North Korean people, the result has always been the opposite of what U.S. officials have been aiming for.