Marx saw society as divided into "base" and "superstructure". The base is the means and relations of production and the superstructure is everything else: culture, law, religion, …
Marx believed the base is the important part and more or less determines the superstructure (hard materialist perspective). This is a controversial idea among later theorists, many of whom took softer stances on the question.