Yes, bankruptcy's automatic stay requires most creditors and debt collectors to stop all collection efforts against you until the bankruptcy is over. (To learn more about the automatic stay, see Nolo's article How Bankruptcy Stops Your Creditors: The Automatic Stay.)
But if all you want to do is stop debt collectors from contacting you, there is an alternate route. Under the Fair Debt Collection Practices Act, you can request that debt collectors stop contacting you. Simply send a letter stating that you want the collection agency to cease all communications with you. All agency employees are then prohibited from contacting you -- except to tell you that collection efforts have ended or that the collection agency or original creditor intends to sue you or take advantage of some other legal remedy.
Keep in mind that this remedy only applies to debt collectors. Creditors can continue to contact you (except in some states that extend this remedy to the original creditor as well as collection agencies). To learn more about dealing with debts and debt collection agencies, see Nolo's Debt & Collection Agencies section.
For clear-cut answers, information and strategies you need to figure out whether bankruptcy is the right solution for your debt problems, see The New Bankruptcy: Will It Work for You?, by Stephen Elias (Nolo).