We can use the formula for calculating distance using absolute and apparent magnitudes, known as the distance modulus equation:
m - M = 5 * log10(d/10)
where m is the apparent magnitude, M is the absolute magnitude, and d is the distance to the star in parsecs.
Substituting the given values, we get:
6 - (-4) = 5 * log10(d/10)
Simplifying, we get:
10 = 5 * log10(d/10)
Dividing both sides by 5, we get:
2 = log10(d/10)
Using the definition of logarithms, we can rewrite this as:
d/10 = 10^2
d/10 = 100
Multiplying both sides by 10, we get:
d = 1000 parsecs
So the star is located 1000 parsecs away.
Note that parsecs are commonly used in astronomy as a measure of distance, and are defined as the distance at which one astronomical unit (AU) subtends an angle of one arcsecond. One parsec is approximately 3.26 light-years or 3.09 x 10^13 kilometers.