Basically a line item veto, but for declaring laws unconstitutional.
Not only can they invalidate parts of laws, but they can say that a law is unconstitutionally applied only in a particular manner or set of circumstances.
An example of a law that has been declared partially unconstitutional is the federal Voting Rights Act of 1965.
This falls under the concept of severability. In short, if a particular piece of legislation (or a contract or whatever) is stricken down, how much of the rest of it must also fall down as a result? By default, the courts decide the severability of a given issue, and they strike down everything that must be stricken down to resolve the legal or constitutional violations, if any. This can result in anything from a sentence or a paragraph being eliminated, to the entire document being invalidated. The court may find that the parties would never have entered into the contract in a legally binding way if the particular clause(s) are removed, and so may invalidate the entire contract, for example: it was all a house of cards with an invalid foundation.
Thankfully (depending on who you ask, anyway), the courts generally allow severability issues to be declared within the document itself. And, indeed, many pieces of legislation and contracts are built with clauses that spell out that most/all clauses and sections are severable from most/all others. With such a clause in effect, the courts would strike down only the exact and specific offending clauses (and anything severability concerns still apply to and fail to stand), and everything else will remain.
The judicial tradition within the US with regards to severability (or just about anything else) is usually to save as much of the legislation as possible. This is ostensibly done out of respect for the legislative power being invested in Congress. A habit of wholly destroying broad swathes of legislation could be seen to transgress upon that.
The US appellate court process will also review severability issues when suitably brought before the courts on appeals. A recent challenge to the ACA ("Obamacare"), Californa v. Texas, had petitioners and ultimately the judge claim the entire law was inseverable from a clause that Congress had modified, and so invalidated the entire law, but on appeal to the 5th circuit the issue was sent back to that judge with instructions for reconsideration with regards to severability. A final decision by SCOTUS is still pending.