Michel Foucault famously denied any attempt to identify him and his thought with any "-ism" like Marxism, Structuralism or Post-Structuralism. However, his thought certainly has some of the characteristics of these traditions of thought and Foucault definitely corresponded with many thinkers who are labeled by these isms. This short post will focus on Foucault's relationship with Structuralism and Post-Structuralism, for his relation to Marxism see our separate discussion on Foucault and Marxism.
Foucault's approach to language was deeply inspired by Structuralism and the work of Ferdinand de Saussure and his followers like Roland Barthes. What is especially important for Foucault in Structuralism is the view that language is controlled by sets of rules which govern the range of possible utterances. Another important notion for Foucault found in Structuralism is the notion that we have no excess to any reality which precedes its representation in language or discourse. Languages refers to meaning, not to material reality, and this means for both Foucault and de Saussure that we actually can't talk about reality.
However, some of Foucault's reservations from Structuralism shift his thought in the direction of Post-Structuralism. For starters, Foucault rejects the idea of absolute and permanent structures at the base of language and culture. His view is of much more indeterminate and open. Another thing is that Foucault rejects the idea that language or discourse can be objectively described. Foucault strongly insists that we cannot think outside of discourse and held that this precludes any "scientific" approach to it. Unlike traditional Marxist thought (and more in line with later Marxists like Althusser), Foucault thought that language and discourse (or ideology for Marx) do not "mask" or obscure reality but rather take part in the dynamics by which reality is constituted. His open and non-essentialist take on society and history places Foucault closer to Post-Structuralism.