How should I know how to read it if the context is the same for both the readings?
まじなう is an outdated rare reading. If you see 呪う in modern Japanese texts and there is no furigana, you can safely assume it is read のろう.
Semantically, のろう is simply "to curse" in the sense of "to pray or cast magic for misfortune". まじなう has a broader meaning as seen in this entry.