A fossil is any remain of a dead organism; this includes a part of the organism (such as a preserved bone or part of its DNA) or simply indirect evidence (which is what inorganic fossils are). Conditions must be just right for organic or inorganic fossils to be preserved: the fossil must be buried deep enough so that bacteria cannot eat it and water cannot dissolve it, but the layer of rocks over it cannot be so thick that it crushes the fossil.
Tracks are preserved movements, like footprints; they do not contain any part of the organism, but instead are evidence of the organism's behavior and size. Tracks are formed when an organism steps in soft mud, which then gets filled in with sand and eventually solidifies and is preserved as sandstone. Dinosaur footprints are the most common type of tracks that have been discovered. Trails are tracks left by animals that do not have footprints (such as worms).
Tracks and trails are a part of a larger type of fossil known as an impression, which is an imprint left by an organism that does not contain any part of the organism. Common types of impressions include impressions left by leaves and by the burrowing of insects. Impressions can occur in other materials besides sandstone, including clay and silt.
Casts and molds are similar to tracks and impressions; however, they distinctly show a part of an organism. Casts and molds are made by the hard part of an organism, such as the shell of a mollusk or the trunk of a tree. Casts and molds are effectively three-dimensional versions of impressions. External molds do not contain any organic material; the organic material that had made up the shell dissolved by the time it fossilized, and was filled in with inorganic material, like sediments.