There is no one right feed to offer your pets. Backyard chicken keepers generally try to offer the best we can, and what our flock prefers. You may get organic--or not. You may get "whole grain feed," which provides some unmilled grains in their natural form. You may get pellets, where the feed is milled and then crushed together to form little nuggets. Or you may get crumbles (smaller pieces), or mash (the smallest).

All these types of chicken feeds are complete feeds because you don't need to offer them anything else to keep them healthy. Of course, that doesn't mean you can't offer treats, either. It DOES mean that the majority of their diet should come from their complete feed, and not from treats, which may not provide balanced nutrition. Scratch is a treat that can be made mostly of corn and may contain some other grains. It is NOT a complete feed; it is just a treat.
Baby chicks should be offered chick starter as their complete feed. They grow fast and have special nutritional needs. It's milled finely so it's small enough to eat, and doesn't have the same amount of calcium needed by layers (for their egg shells). Juvenile birds are sometimes given grower between the time they stop eating starter and start laying eggs and needing layer. Adult hens will want layer feed, which is a bit lower in protein than chick feed, and higher in calcium. Birds kept for meat production are offered different formulations depending on their age and how quickly they're wanted to grow. Etcetera!
Just like dog and cat food, there aren't really hard and fast rules for when to start your birds on this or that type of feed. Even chicken keepers will disagree on the "rules." Some might start offering layer feed when it's getting close to the time their birds should be laying. Others will wait until after that first egg. Each manufacturer has its own recipes and recommendations. So if you're not sure what type to feed your birds, just have a look at the recommendations on the feed bag, and use your best judgment for the needs of your flock.
A proper diet is essential for egg production, though... so if you're feeding a bad diet such as all or mostly scratch, your hens simply will not be laying well. There are a number of reasons your chickens might not be laying well, so if you suspect there's something more to it than diet, have a look at this list of other possible reasons your chickens aren't laying well.