Contingency fees and lawyers explained

How does the contingency fee model work and what should lawyers and clients bear in mind when using it for cases?
How does the contingency fee model work and what should lawyers and clients bear in mind when using it for cases?