A person runs for the office of the President, promising to get rid of a law. That person gets elected president, then gets rid of the law because the president can do that. The way it works is that the President goes goes “I hereby get rid of this law!!!”
The President of the United States can neither make a law or get rid of a law. If the President does something, say with an Executive Order, that looks like making a law, there could be trouble. There are things the President can do and things the President can’t do without Congress somehow being involved, but actually, most of those things the President can do “without” Congress are either things that are legally specified (Congress has made a law saying the President can do this thing) or they are specified in the Constitution directly. But most of the time, even stuff the President seems to be doing independently of Congress have to be approved by Congress (either both branches or one or the other) such as making treaties with other countries or appointing judges and cabinet members.
Yes, folks, as frightening as it may seem, Congress in fact runs the country, and the President is more like a CEO. Sort of.
So how do you really get rid of a law? For all practical purposes there are three ways, two of which are very clear the third way much more ambiguous.
The main way you get rid of a law is to pass another law that kills the first law. Sort of like Rock Paper Scissors but with laws. Putting it a slightly different way, Congress uses the procedures of lawmaking to unmake laws, often replacing them or amending them into virtual non existence or into a totally new form. The second way to get rid of a law is to “overturn” it on the basis of the fact that it is unconstitutional. Laws are supposed to be written within a framework provided by the Constitution. Sometimes they just plain aren’t. Sometimes the interpretation of the Constitution evolves and a law that seemed OK before no longer is. More rarely, the Constitution changes underneath the legal system and that can affect laws (like giving women the vote or removing Prohibition, etc.)
While a law that is suddenly unrecognized as unconstitutional can be undone by Congress by an “Act” (that is a thing Congress does to make a law), laws are only “overturned” by the third branch of government, the courts. This is rather complicated. A law may be overturned in relation to a particular application, or in a particular jurisdiction, or only part of the law is overturned. Sometimes, when the courts are done with it, a law is simply gone. Other times, Congress acts to redo the law so it meets the requirement of the courts. Sometimes the law remains partly or largely intact but the courts require that enforcement or implementation changes.
Which brings us to the third way a law can (sort of) go away. This is when some court or courts have said some thing or another about a particular law and it is apparent that further implementation of the law by a particular executive body (like the Justice Department) will meet with displeasure in the courts. In this case, enforcement of the law may be curtailed as though the law isn’t there any more, the justification being that the executive body can not in good conscience carry out an activity clearly determined wrong by the court system, even though perhaps not yet in every jurisdiction or as unambiguously as one would like.
This grey area leads to a lot of strange things. A presidential candidate may promise to be against a law, and is elected. But the law is still there. Later, some issue comes up with the law and it is required (by law) that the government do something. So, you’ve got that President’s Justice Department, headed by some guy the President went to Law School with, and agrees with, taking action in court to enforce a law that everyone wants to be gone. You see, with many laws, the enforcers of the laws can’t choose whether or not to enforce. Not only are they legally bound to do so, but in an adversarial divided government (one party in the White House, the other in Congress) failure to follow the law could lead to impeachment. Anyway, this sort of activity further develops the legal activity associated with the law and a court has an opportunity to finally kill it. You saw this with Don’t Ask Don’t Tell. Obama campaigned on getting rid of it. He tried the “I hereby cancel this law thing” but it didn’t work (only kidding, he could not have tried that without getting impeached!). The Justice Department was forced to enforce the law (because it was the law) while at the same time the Obama administration was trying to make Congress make the law go away. That took some time. It would have been nice for the Justice Department to rule that they could not enforce the law, and/or the Military courts to do so, because various courts had overturned nearly identical laws elsewhere. But that hadn’t happened, so they could not.
This is all pretty basic, and I’m only outlining a very simplified version of how I understand the system to work, and I’m not a legal expert. I’d love to fill this in with examples and more details. The reason I’ve written this rough description up is two fold: 1) To have something to point to when people say things like “Why hasn’t Obama just gotten rid of this one law I hate?” and 2) so you, the legal expert who has read this so far and thinks I’ve got something wrong, can correct me … at which time I’ll be happy to edit the text appropriately.