Yes. And when you drive or do anything in other countries too. You're expected to know the local law and keep to it. As the saying goes, "ignorance of the law is no excuse" or anyone could get away with anything just by saying they didn't know.
But they don't differ much from state to state so people usually don't find this a problem. Not surprisingly, what is illegal is pretty much all the same things. Observe the signs, keep to the speed limit, don't drive under the influence, all that stuff.
For a really silly example, go to the UK and drive on the right and you'd soon have a serious accident, so it would be wise to keep to the law that you drive on the left there.