While there are countless programs promoted that will block ads, they all use a handful of methods to detect and block ads. Most ad-blocking software use a combination of the following methods to detect ads.
Flagging ad delivery servers: Most ads are delivered from specific servers that are dedicated to the delivery of ads (e.g. all AdSense ads come from http://pagead2.googlesyndication.com). Since these servers typically don't deliver normal content, lists of these servers are compiled and distributed in a fashion similar to virus definition updates.
Flagging Keywords in URL: In their infinite wisdom, ad providers make detecting ads very easy by commonly using specific strings within the URL's of ads (e.g. "/banners/"). By simply using regular expressions, ad blocking software can detect and flag ads.
Flagging Specific Object Sizes: While standardizing the sizes of ad-formats made it easier to produce and distribute ads, it also made it easier for ad-blocking software to detect ads by simply flagging objects that are of specific sizes.
Flagging Specific Media Types: Some media types (e.g. flash) are most commonly used for ads and not as commonly for regular content. Thus, these media types can be safely flagged and blocked.
Regardless of software package, once detected, all ads are blocked/hidden using one of the following methods. Without a significant architectural change to the way browsers work there can be no other methods.
Prevent ads from being downloaded from servers: This is the simplest and most commonly used method of blocking ads. Even within web browsers there is an option that prevents the download of images from third-party servers.
Remove HTML source code for the ad from the webpage: This method is commonly used by proxy software. Basically, when the proxy server or firewall (e.g. ZoneAlarm Pro or Proxomitron) detects an ad, the html source for the ad is written out of the webpage before delivering the page to the web browser.
Use CSS to hide ads: With this method, the ad object has its CSS state set to "display:none" or "visibility:hidden". "Display:none" collapses the space taken up by ads, which can mess up the layout of webpages. "Visiblity:none" hides the ad, but leaves "white space" where the ad should be. This preserves the layout of the page, but leaves lots of holes. Sometimes hiding ads via CSS is done in conjunction with preventing the ad from downloading but not always. The theory behind hiding the ad but allowing it to download is that this is harder to detect (which is false) and publishers won't care as the ad still loads and thus is still getting paid.
Replace ad image with a placeholder: An example of this method would be the Flashblock extension for Firefox. While used by Flashblock, this method is not commonly used. For normal image based banner ads, this method may prove to be hard to detect, however, it is also easy to defeat by simply not providing width and height clues in the webpage's HTML and CSS.