Let's look at an example:
I play 3 notes: A4, A5 and E6 (the E above A5 - remember, the octave number changes at the C).
Taking A4 as 440Hz, and using the equal temperament system, we can calculate that:
However, the A4 is likely to have a number of harmonics (playing sine waves can get a little boring...) The 3rd harmonic of A4 is simply:
This is 2Hz different from E6, and will cause "beating". More complex chords will have even more complex interactions, and can get very messy. You've probably heard this on a real pipe organ - complex chords sound out of tune with themselves.
Another way to calculate pitch intervals is Just temperament. We can base this on the circle of 5ths: the 5th is 1.5 x the tonic frequency.
This gives us:
This will not clash with the 3rd harmonic of A4, so will give a purer, cleaner chord.
There are many different temperament systems, all which will give different sounds to your chords - and that's not even looking at the non-standard tunings and non-european scales.
Logic has many tuning and temperament settings that are worth playing with (you'll find them under Project Settings, Tuning), from Pythagorean to Bavarian Bagpipe tunings, as well as adaptive (Hermode) tuning, that adjusts the temperament according to the chords playing.
How about real-life instruments? Well, for fretted instruments, there's not much that you can do - until now. Check out the True Temperament guitar necks, with their Curved Frets. Freaky, but very cool!
Anyway, enough nerding - go play with your tuning settings!