So I'm following guitar lessons finally! And have come to power chords section... The lesson mentions an a5 power chord, it is played with the root (6thstring) on the 5th fret wich makes it an A Power chord,

Then it goes onto power chords onto on the 5th(A string) a power chord played on the 5th fret of the A string is a D power chord,

So my question is, if in music or of someone asks me to play a D power chord, how do I know if I play it on the 6th string 10th fret or A string 5th fret and so on?
You don't. It's a pure judgement call based on the situation you're playing in.
R.I.P. My Signature. Lost to us in the great Signature Massacre of 2014.

Quote by Master Foo
“A man who mistakes secrets for knowledge is like a man who, seeking light, hugs a candle so closely that he smothers it and burns his hand.”

^Yep. Also keep in mind that when you use the thicker string at the 5th fret you get a more heavy sounding chord than when using the next string open as root.
Usually though, they aren't played at the 10th unless needed - it's far to travel down for one, plus you might get lots of unwanted noise from harmonics at the 12th. Like previously said - it depends on what you were playing before and what you're going to play after - generally you'd want to play your chords and notes near the same frets for better flow and what not