It needs data from before and after the treatment for both groups, and one key assumption: parallel trends, meaning that without the treatment the treated group would have changed by the same amount as the control. In regression form, the effect is the coefficient on the interaction between a treated-group indicator and a post-period indicator.
Example: a feature launches in city A but not city B. Weekly orders in A go from 1,000 to 1,300, and in B from 800 to 960. Comparing A before and after credits the feature with 300 orders; subtracting B's change of 160 gives a difference-in-differences estimate of 140. If the trends are proportional rather than additive, compare logs instead: A grew 30% and B 20%, an effect of about 8%.
The classic study is Card and Krueger's 1994 comparison of fast-food employment in New Jersey, which raised its minimum wage, and neighboring Pennsylvania, which did not. Check parallel trends with several pre-periods, watch for anything else that changed in only one group at the same time, and consider synthetic control when no single group is a good comparison.