Studies of some aspects of interactions of electrons and muons with matter and application of ferromagnetism