ok, i'm new in theory and stuff so i wanted to ask you this...
i heard that often in songs that are in C major or A minor an E chord is used. and E is E(root), G#(third) and B(fifth).
and as much as i know, this G# doesn't really fit in C major/A minor.
there's also one song that goes like this:
C G Am
Am F C G
the song should be in C major but it has this G# in E chord and still sounds good. if i play Em instead of E it sounds really ****ty.
so can anyone explain this to me?
They do it because it sounds good. Read below if you want to risk being confused for a while by the real reason.

There is this scale called the harmonic minor scale. It is a regular minor scale, but the last note, the seventh, is raised 1/2 step. Instead of being 1 2 b3 4 5 b6 b7 like the natural minor scale, harmonic minor in 1 2 b3 4 5 b6 7. In the key of A, G# is that last note. They play regular A natural minor stuff, then go to A harmonic minor when they reach the E chord. There is a lot of tension caused by this major chord and tension sounds really good when it is used properly.
As for your question about the song, SD wrote this lesson about it.


BGC is correct as well

Especially pay attention to this part:
1 - major
2 - minor
3 - minor
4 - major
5 - major
6 - minor
7 - diminished

By applying this pattern, you can quickly figure out that the chords in the key of C are:


edit: well I guess you understand it then, but that is a good lesson if you're confused on anything while you're still on that topic.
To see a World in a Grain of Sand
And a Heaven in a Wild Flower
Hold Infinity in the palm of your hand
And Eternity in an hour
Good explanation.

I haven't played through the progression above, but does the Em really sound that bad? Em is in the key of C/Am so if that E was an Em, everything would be diatonically correct. Maybe it's just that you know the song well so the chord sounds out of place in that song, but it is not out of place with that family of chords.

I rarely use E in the key of C, but as the poster above me said, if it sounds good, it's right.

When learning theory, go out of your way to break the rules but still understand why you're breaking them and why it works, which it looks like you're already doing.
^ No, Eminor is fine and sounds good in a lot of cases. It's just that if you play an Emajor, you substitute a G# instead of a G, which makes the implied scale a harmonic minor. So you can play Em if you want a natural minor scale, or E major if you want a harmonic minor scale (in the key of A minor, or C). Try playing Am, F, E, Am for a cool harmonic minor sounding riff.
"Too few exercise the greatest freedom they have - the freedom of thought. Perhaps they demand freedom of speech as compensation." - Soren Kirkegard