Nijo Castle, a famous 16th-century castle in Kyoto, Japan, features "nightingale floors" -- wood floors intentionally designed to squeak to protect the Tokugawa shoguns from marauding ninja. You probably don't have as many enemies as the Tokugawas, so the creaking, squeaking and cracking sounds from your hardwood or laminate floor are just an annoyance. Solutions for the creaking range from sprinkling talcum powder on the floorboards to screwing down the boards or even the subfloor.
Hardwood, engineered and laminate flooring planks expand and contract with changing temperature and humidity, and in their contraction phase, they may rub against each other when you walk on them. Moreover, hardwood and engineered boards can lift if they were installed with insufficient nails or if the particleboard subfloor isn't holding the nails securely, and they also squeak. A third cause of squeaking is the subfloor itself -- it may be lifting off the joists, or the joists may be too far apart to support it. This can cause squeaking even if the floor is carpeted.
If your wood or laminate floor is squeaking, you may be able to stop the squeaks by dusting a lubricant such as graphite or talcum powder over the squeaky area. Spread the powder liberally, then force it into the cracks between boards with a broom or a dry mop. Walk over the squeaky section to distribute the powder evenly, and if it works, the squeaking should stop. This isn't a permanent solution -- the boards will eventually begin squeaking again, and you'll have to apply more powder. If you have a laminate floor, though, it's the only practical way to stop the squeaking short of replacing some of the boards.
If your engineered or solid hardwood floor is squeaking because some of the boards are lifting, you'll usually be able to feel play in the floor when you walk over the loose boards. Reset the boards with screws -- not nails -- and do it from above or below the floor. It's preferable to go underneath the floor and drive 1 1/4-inch screws up through the subfloor while someone stands on the boards you're securing to hold them down. If you can't get under the floor, make the repair with trim screws or breakable screws designed for this purpose. Fill the screw holes with wood filler, then dab them with stain and clear finish.
If the subfloor is lifting from the joists, you should examine the floor from underneath to see what's happening. You may be able to fill the gap between the subfloor and the joist with construction adhesive or drive a shim into it. You can also buy repair anchors that hook onto the bottom of the joist and draw the subfloor down when you drive screws into it. In some cases, you may find that the subfloor lacks support, and you may need to install blocking between the joists to support it. If you can't get under the floor, you may be able to make the repair from above with trim or breakable screws.