Congress can only compel states to enforce laws that are listed in the US Constitution. For instance, a state can not stop the US Census during a census year.
In theory, federal laws that are not directly in the Constitution do not trump states' laws. For a reference, I would suggest you look up both the 9th and 10th amendments and read them carefully. The federal government is one of listed powers: i.e., they only have the powers specifically given to them in that document and any amendments - no more, no less.
In practice, federal law largely trumps the laws of the states because one of those enumerated powers is "To regulate Commerce with foreign Nations, and among the several States, and with the Indian Tribes". This is known as the "commerce clause". The courts have mostly given the federal government wide latitude when it comes to this clause, which basically allows them to claim virtually everything as "regulating commerce." For an example, making marijuana illegal is not an enumerated power as per the Constitution, so on its face, the feds cannot make the drug illegal nationwide. However, they claim that since it can be grown or imported in one state and easily taken across the border and sold, it affects interstate commerce, and so falls under federal regulation. Yes, it is an EXTREMELY long stretch, but the courts have generally interpreted it this way since the early 20th century, culminating in the Gonzales v. Raich case (see sources).
So your government book is correct when it says that Congress cannot compel states to act in compliance with federal standards or laws. But when the federal government gets drunk with power and has the courts allow them to misinterpret the Constitution to make them able to do what they wish, it is corrupted, and allows the feds to compel states to do whatever they want without question.
Yes, it really works like this. Hopefully, more people will stand up to it and change it back to the way it is supposed to be.