But if abortion is still legal, how could there be a case that gets appealed?
This could be done by arresting someone who would be in violation of the new law if it were upheld, much as described in the answer by Dale M. If the State were to initiate a case, this would be the way. Or instead of arresting a person, the state could levy a fine, if the new law provides for that. The procedure would be the much the same.
If an anti-abortion law provides for an injunction to close a facility offering abortions (as I understand some proposed laws do), the State couldm proceed by obtaining or attempting to obtain such an injunction. If denied because of Roe v Wade that denial could be appealed.
However, if someone opposed to the law wants to challenge it, expecting it to be overturned, that person (or group) could file for an injunction against enforcement of the law, or for a declaratory judgement that the law was invalid. That is the procedure by which most previous (post-Roe v Wade) would-be abortion laws have been challenged. Such a challenger must have, I understand, a "credible fear" that the law would mbe enforced against him or her, such that they are constrained in their otherwise lawful activities by such potential enforcement. If under the circumstances the law cannot be or is quite unlikely to be enforced against the challenger, that person will not have standing to bring the case.
Doesn't someone have to be arrested under one of the new laws, and then the judgement in that case gets appealed?
No. It could be done that way, and might well be. But the state could levy a fine without arresting anyone, or obtain an injunction closing a facility. Any of these would lead to a test case, where the issues would be essentially the same.The lawyers for the state might think it would be easier to get the US Supreme Court to overturn Roe if it doesn't involve sending a doctor who was following the law as it existed previously to prison. If they think that, they might well be correct.
A lower court is forced to uphold this precedent, right?
Yes and No.
A lower court cannot overrule a Supreme Court decision. But it can sometimes find some grounds on which the current case is different from the previous case, the one being urged as precedent. Then it could rule that the differences were sufficient that the precedent did not apply. I think that would be hard to do with Roe v Wade, because it has been upheld and extended a number of times, in several different factual settings.
Also, a lower court will sometimes say that other decisions have so changed the underlying rule that the case urged as precedent is no longer good law, that it has been in effect overruled implicitly.
In either case such a decision by a lower court would be likely to be appealed, and might well reach the Supreme Court just as if the ruling had been the other way.