What type of lawyer charges only if a case is won?
Lawsuit / Dispute Attorney
Some attorneys take matters on contingency. Personal injury cases, some contract cases and other civil damages cases are some of the kinds of such matters sometimes taken on contingency.
Juvenile Law Attorney
i have never heard of a criminal lawyer taking a case on a contingency (only paid if they win). This is generally only common practice in cases dealing with money. (primarily civil or personal injury lawyers).
Criminal Defense Attorney
Rarely in a criminal case, a lawyer will agree to do it for free or next to free if it involves unique facts, notoriety or just for experience in a new branch of criminal law. Lawyers like Clarence Darrow took on many cases on principle and of course built a huge reputation doing so. But beware, not every lawyer willing to work for free is Clarence Darrow!