MDF are the primary data file in a File Group. These files contain "data" - so your tables, indexes, keys, constraints, UDF, UDT, stored procs, functions, etc...
LDF files are your transactions.
NDF files are the same as MDF except they are subsequent datafiles in a File Group
BAK files are your full backups
TRN files are your transaction backups