Coral cannot touch one another as a general rule, particularly SPS. Exceptions may occur if they are of the same species or from the same colony.
Some LPS let out stingers: long tentacles loaded with toxin. The idea behind this for the coral is to clear a space for growth and also for defense. Examples are hammer coral and brain coral. Allow room for growth and for the stingers when you locate these in your tank.
Some softies can peacefully coexist as a garden. Like a garden of multicolored Ricordea or zoas or 'shrooms. Some will secrete toxins into the water that can melt other coral, like the coral from genus Sinularia.
Your best bet, and best advice really, is to research each coral you see before you buy. The research will tell you if the coral is compatible with the rest of your livestock, but more importantly if your system can handle it. If you really like what you see but have not researched it yet, most LFS will put a 24 hour hold on it.
Another general advice is to run GAC 24/7. This will adsorb toxins released into the water. I have an SPS dominated mixed reef, 4 years old, and coral warfare is a constant thing. GAC allows them to coexist by keeping the water coral-toxin free.