The rabbinic principle of marit ayin (literally: “appearance to the eye”) holds that certain actions, though they should technically be permitted by Jewish law, are nevertheless forbidden because they appear to violate the law. It’s a sometimes tricky concept: because an action appears to violate the law, it becomes classified as a violation. Examples include eating food that appears to be unkosher, entering a non-kosher restaurant to use the bathroom, and laying out wet clothes to dry on Shabbat (which gives the appearance they have been laundered on Shabbat, in violation of the rules of keeping the Sabbath).
The category of marit ayin, however, is not as fixed as other rabbinic laws. While lighting a fire never was and never will be permitted on Shabbat, acts of marit ayin are culturally conditioned and change over time (read on for examples).
Marit ayin largely (though not only) applies to eating foods that appear to be unkosher. For example, on Passover it is forbidden to eat hametz, leavened food prepared with one of five forbidden grains: wheat, rye, barley, oats, and spelt. But many Jews also avoid another category of foods called kitniyot which includes rice, corn, legumes, and various seeds. There are several explanations given for this custom, but one is that these foods can look like hametz. A muffin made entirely of cornmeal might technically contain no hametz, but looks like a food that would be forbidden on Passover. Thus, based on the principle of marit ayin, many Jews will not eat it.
The Talmud contains a vigorous debate over whether actions that are considered marit ayin, are forbidden in private spaces where no one can be misled. Some rabbis feel that an action that is marit ayin should be forbidden only in public spaces, and others that it should be forbidden even in private. One example of the debate comes to a head in Shabbat 65a in regard to laying out wet clothing on Shabbat. Doing so might violate marit ayin as it would appear as if the individual had laundered their clothes on Shabbat. In this scenario, some rabbis hold that the clothes cannot be put out to dry in public (i.e. on your front lawn), while some rabbis hold that one cannot even lay out the clothes to dry in a private backyard.
Unlike other Jewish laws that are fixed, the category of marit ayin is fluid and depends on the cultural context. An action which appears to be a violation in one context might no longer appear to be a violation in another. For example, at one point in time, nondairy milks and creamers were uncommon and consuming them with meat might have been classified as an act of marit ayin (appearing to violate the prohibition on mixing meat and milk). In the modern day, when an array of nondairy milk options are widely available and common, this is no longer a concern.