How does RNA "know" which DNA strand is the template strand?
It's the DNA-directed RNA polymerase that has to "know" which strand is the template, and that is determined by the binding of transcription factors that help the polymerase attach to the site where transcription will start.