In Spanish we use "detrás" to express position or that an object or someone is behind something, for example, the ball is behind the girl. While "atrás" is used to indicate something related with time, is a sinonym for "ago". You can use it for example, that was a long time ago--》 Eso fue mucho tiempo atrás 《-- translation.