You don't enforce it. The point of such laws is not to actually be enforced, but as a legal tool when problems come up. For example, if you as an adult say something inappropriate to a child online thinking it's an adult, you'd be protected if it's ever brought up, because the child shouldn't have been online to begin with and it was not your responsibility to check the other person's age. It's not unlike being in a bar and assuming everyone is 18 or older, because it's the bar's responsibility to forbid entry to anyone younger.