In addition to forbidding the consumption of hametz (leavened products) on Passover, the Torah emphatically prohibits us from owning any hametz during the holiday as well. Indeed, the Torah commands us to rid ourselves of hametz on the eve of Passover, which is done through ביטול חמץ (verbal nullification of hametz) and through ביעור חמץ (physical elimination of hametz from one's domain). Any hametz that remains in the possession of a Jew during Passover becomes forbidden to eat or enjoy even after the holiday.
Now, it is certainly true that selling your hametz qualifies as completely removing it from your domain. Once you sell an item to someone else, it is no longer yours. It permanently belongs to the buyer.
Nowadays, however, hametz is "sold" in a legally fictitious manner. A representative of a large number of Jews in the community "sells" their hametz to a non-Jew using various legal instruments that would normally be fully valid methods of transferring ownership. Typically, the non-Jew leaves a "deposit" with the representative and stipulates the following condition: He agrees that he will deliver payment in the amount of the full value of the hametz by the night after Passover, and that if he does not do so, the sale will be cancelled and the hametz will revert back to the Jewish owners who are presently "selling" it.
The hametz, meanwhile, remains securely locked in the pantries of the "sellers". Bear in mind that the "buyer" doesn't know any of the sellers, has no idea where they live, has no access to their residences and - were he somehow to gain entry to their homes and attempt to claim his hametz - no chance of actually being able to eat it during Passover! As soon as the holiday is over, the non-Jew predictably fails to deliver the outstanding balance he promised, and the sale is cancelled.
From a strictly legalistic standpoint, this might be a valid arrangement, (although, to be honest, some authorities do question its efficacy). During the course of the holiday, the argument can be made that the hametz is, technically speaking, officially owned by the gentile. And we can understand why the rabbis initially promoted this ceremonial sale. Jews in the Old Country were poor and could not afford to destroy what hametz they possessed. Moreover, many of them had expensive liquor or were in the liquor business and would stand to absorb major losses were they forced to discard their stock of hametz.
Let's face it though - selling hametz MAY "work" on a technical level, but in terms of the spirit of the law it fails miserably. Psychologically, we never fully disconnect from our hametz, knowing that it is safe and sound in our cabinets. We never experience the absolute dissociation from hametz we were meant to experience on Passover. "Sure, we sold our hametz" we say - wink wink - as we anxiously await reopening those cabinets at nightfall when the holiday draws to a close and we can once again partake of the hametz we possessed all along...
Today, thank G-D, most of us are in a far better position than our ancestors and can afford to dispose of our hametz in accordance with the original law of the Torah. We don't need to rely on a form of subterfuge that satisfies most (NOT ALL) legal opinions while undermining the spirit and confounding the purpose of the Torah's instructions.
In summary, if you really, truly cannot afford to dispose of all of your hametz, then by all means, do not hesitate to sell it through your rabbi.
But if you won't be seriously financially harmed by doing the mitzvah, then be true to the spirit and the letter of the law, and remove all hametz from your domain for Passover!