Any books you recommend for learning the basic fundamentals of viruses, trojans, or just any malware in general?
Malware is a very large genre of programming.
Everything you listed are different items with different goals Virus: a programs that copies itself (with various levels of sophistication).
Worms: self-replicating programs.
Rootkits: programs that change a system at a lower (typically kernel) level to mask infection from the user.
Trojans: Programs that act like other programs (typically with malicious intent)
Remote Access Trojans (RATs): are programs that act like something else but actually create backdoor access into systems.
Spyware: Focuses on intercepting user activity on a specific machine.
You need to start by deciding what you want to achieve. Do you know anything about programming already?
If not, then I'd recommend learning a programming language before doing anything else.