#1
When you have two guitar players in a band i heard that you have to create contrast with their two parts as much as possible. I never been in a band before but i wanted to know how true this is. For example, if a chorus of a song has the two guitar players playing power chords, one of the guitar players should play the chords on the top 2 strings while the second guitarist should play the chords on the bottom 2 strings. Is this true? I heard that if both guitarists play the power chords on the same strings it would muddy up the sound
#2
There's no rules here.  Just different effects achieved in different ways, for different reasons.

Sometimes it sounds good to have two guitarists both playing power chords in the same position.  Ideally, of course, they should be perfectly in time and playing the exact same rhythm.  But of course they should be perfectly in time whatever they're doing (OK then, that's ONE rule ).  Then again, sometimes the "muddy" sound caused by slight variations in what each of them plays could be a good thing, in a grunge or punk band.  That kind of looseness and rough-and-ready informality is a positive in that case.

In rock, also, the "wall of sound" is often another desirable effect, achieved by two (or even more) guitars playing much the same thing, filling the space with maximum volume.  
In jazz, quite different criteria apply.  Notably the famous "less is more" principle.  In jazz, the idea is to never double up on what anyone else is playing, if you can help it.  So guitarists (and pianists) will leave the roots and 5ths out of their chords, because roots and 5ths are (mostly) the bass player's job.  Only one instrument tends to accompany a soloist - if the band has guitar and piano, then one or the other will play behind the soloist, not both, while the other lays out, enabling the comper to add their own rhythmic kicks without fear of the other player playing anything different (and confusing the soloist).  At times where both do play together (as when there are two guitarists), then they will play very diferent things.  One may keep the beat while the other plays punctuations, or arpeggios, or single note lines.  

In general, then, it's a good idea for two guitarists to play in different ways, simply because that exploits the fact you actually have two guitars!  (Why have them play the same thing? You only need one for that.)  It could mean what you say, that they both play power chords, but in different positions.  Or one player plays power chords, and the other plays more complete chords; or just plays 3rds and 7ths, so they complete the chord between them.  Or one strums, and one picks arpeggios, or plays riffs or single lines.  There are all kinds of ways of arranging the two parts, depending on the sound required.  That might be dictated by the song, or by a kind of whole band strategy, if they want to establish a sound for themselves based on how the guitars interact.
#3
jonriley64 Thanks for sharing this information! I was thinking about starting a band and really needed to know how to construct a song with 2 guitarists. 
#4
Start checking out the tabs of some of your favorite bands with two guitarists. You'd be surprised how often both guitars are playing the exact same thing in a rock band. As mentioned above, it adds to the whole "wall of sound" thing when playing live, and on recordings often times bands will layer tracks playing the same thing with different tones in order to really have a really full sound in the playing.

You don't always need to play some other harmony to the other guitar, but that does add a welcome element when done right.
#5
The only thing you "have" to do to make good music is be intentional about it.

Regardless of instrumentation, you can choose to make parts that either contrast or work together. What matters is that you make the choice intentionally and don't just go with something because it's the first idea or the easiest or the most comfortable. Look at your ideas and decide intentionally what you like best. Another effective technique is to decide on a sound/concept/whatever and make the music to fit.