During sexual reproduction, the process of crossing-over means that parts of the maternal and paternal chromosomes become shuffled up with one another into chromosome 'chunks', as shown by the red and blue colours here:
We can tell by looking at this that if you had two genetic markers right next to each other on a chromosome that they very likely to be inherited together on the same chromosomal chunk. Similarly, if they are on opposite ends of the chromosome, they are much less likely to be inherited on the same chunk.
All other things being equal, we say that the markers close to each other are in high linkage disequilibrium (LD) with one another and markers further apart with be in lower LD with one another. In other words, the probability of recombination occurring between two markers, driven by physical distance and variable recombination rates is what causes differences in LD.
If we want to get a bit more in depth, then the recombination rate (i.e. the probability of a recombination event occurring between any two markers) varies across the genome. Something like a gene fusion event may totally impede recombination, meaning that region is always inherited as a single 'LD block'. This can result in things like supergenes in eusocial insects. Conversely, there are regions of very high recombination which reduce the amount of LD between markers.