Malware does not usually reside "inside" another app, unless the app has been specifically modified for that purpose. If you downloaded illegal copies of software from some dubious website, then that is a possibility. (But downloading it again from there will only restore the malware.)
Did you have reason to think you might have malware? Malware on OS X does exist, but it's rare.
All User preferences are stored in the User Library, yes. Your computer has a Library folder at the top level of the hard drive, and system-wide settings that apply to all users are stored there (e.g. network connections).
Apple recently made the user Library hidden by default: their thinking is likely that if you don't know how to access or reveal a hidden folder, you've probably got no reason to go there. 😁
If you want to unhide the user Library folder and have a browse around, then by all means do so. However, I would advise caution before deleting stuff, particularly Apple stuff.
There are many webpages detailing the many ways you can unhide the folder. Barney above has outlined one.