Theoretical study of magnetic exchange interactions