Does a 10-year B-2 visa mean I can stay for 10 years?
No. The visa lets you seek entry for ten years; each visit is limited to the stay CBP grants, usually up to six months.
No. A 10-year B-2 visa is permission to present yourself at a US port of entry for ten years. How long you may stay on any one visit is decided by CBP at the border and written on your I-94 record, and for a B-2 the limit is normally up to six months (8 CFR 214.2(b)(1)). The visa and the stay are two different documents answering two different questions.
Two dates, two jobs
The date on the visa foil is the last day you can use that visa to apply for admission. The date on the I-94 is the day you must leave, or apply to extend, for that visit. The I-94 controls once you are inside. A traveler admitted on March 1 until August 28 who holds a visa valid through 2035 must still leave by August 28. Nothing in the visa extends it.
You can check the I-94 date on the CBP I-94 website. It is worth doing after every entry, because officers sometimes admit for a shorter period than people expect, and a stamp or printout can be wrong.
What happens at the border
Each entry is a fresh decision. An officer can admit you for the full six months, for a few weeks, or refuse entry. The visa does not guarantee admission, and the officer weighs your purpose, your funds, your ties abroad and your past visits. A traveler who has spent most of the last several years in the United States, even in repeated short stays, can be questioned about whether the real plan is to live there. The B-2 category requires a residence abroad that you do not intend to give up, an idea explained in INA 214(b)).
Extensions and overstays
If you need more time, the request goes to USCIS on Form I-539 before the I-94 date passes, and approval is discretionary. Staying beyond the I-94 date, even by a day, begins unlawful presence. Unlawful presence of more than 180 days followed by departure triggers a three-year bar on returning, and a year or more triggers a ten-year bar (INA 212(a)(9)(B))). An overstay of any length also voids the visa under INA 222(g)), so a ten-year visa can end early.
Who this applies to
It applies to visitors holding a B-1, B-2 or combined B-1/B-2 visa. It does not describe other categories. Students and workers have their own rules for duration of status, and travelers entering under the Visa Waiver Program get at most 90 days.
If you are thinking about long or repeated stays, the pattern is something an immigration attorney can review before you travel.