Robert T. answered 11/04/19
Masters degree in biology with 4 years of teaching experience
I don't know how much detail you need, but this is a relatively "simple" mechanism. There are proteins called "writers" and they are the ones that add modifications to histones. Another class is called "readers" and they, as the name implies, read the code on the histones. They in turn recruit other proteins that either culminate in either condensing chromatin, or opening it up. So, a reader protein that can bind methylated histones will, in turn, recruit proteins that lead to more condensed chromatin, whereas one that recognizes acetylated histones will do the opposite. If you really want to impress your friends, the protein, HP1 (histone protein 1) will condense chromatin tightly together. It has one domain that will bind to other HP1 proteins and/or histones, and another domain that will attach it to lamin proteins in the nucleus. Open chromatin floats relatively "freely" in the nucleus, but condensed regions are "hung from the ceiling" inside a nucleus.
In reality, histones can take several modification. Some of them include, but are not limited to, methylation, acetylation, phosphorylation, ubiquination, sumolyation, ribosylation -- and those are just the ones I can remember off the top of my head. The particular position of each of those modifications matters, too. In low to mid level genetic classes, they don't make this distinction: they teach it such that methylation is "always" inhibitory and acetylation is "always" promoting transcription. The reality is far more complicated!