Salt is the main spice in any dish. You forget to add pepper and savory, but if you forget the salt, most dishes just will not work. The amount of salt you put on each dish is a matter of personal taste.
Most recipes mention salt, or a pinch of salt. Of course, not literally - presumably that actually adds salt to give flavor to the dish, but you should not overdo it, because in excessive amounts, it gets really detrimental.
Having said that about how much salt is placed in a dish, you should know exactly when to put it in- at the beginning of the cooking process, or at the end. There is no definite answer, because different dishes need it at different times.
For example, if preparing fish broth, you should add salt at the beginning of its preparation. On the other hand - if you cook broth with meat, it can be salted only when the broth is ready.
Another important detail is that the fatty meats should be more abundant in salt. Meats like chicken and pork do not like to be very salty, unlike fish that takes more salt. If frying vegetables, salt them immediately before you fry, same goes for eggs.
When cooking potatoes, salt once they are ready - just before you step back from the heat. The fish, which we mentioned loves salt, is salted at least 20 minutes before you fry it.
If you cook meat on the grill, salt it when you remove it. And because each of us has least once over salted a dish, let's see what can be done if and when you have a similar situation occur.