dont buy a fish if there are dead fish in the same tank.
most importantly do a 20% water change every week with safeguard
change filter media when supposed to
dont overfeed.
if you do get a sick fish, quarantine it, but still treat the tank.
ive had fish for 4 years now, and ive learned as i went along, these are the main tips.
spilz