Foreign Aid is simply the transfer of goods and capital from a country or an international organization to another country, Mostly for the benefit of the recipient country.
Aids can be economy, military or emergency humanitarian aid mostly during war times or natural disasters.
Why foreign Aid might sound like a country assisting others it goes way more than that.
Countries usually provide foreign aid for their own security and interest.
Therefore economic assistance from a hegemon may be used to prevent allie countries from deviating and moving to the other direction or it can also be used as payment for the right to establish their military bases on foreign soil.
Let's use Egypt as a case study
Back in the 50s and 60s Egypt aligned more with the Soviet Union and this alliance comes with some benefits like receiving military equipment, technical support and other benefits.
But during that time there was also lots of tension and battle between Egypt and Israel But despite the Soviet support Egypt didn't record any victory with Israel eg the 1967 Six day war.
This made Egypt deviate from the Soviet and jumped ship to the United States and its western allies through the open door policy. Billions of dollars in aids, military equipment and suddenly Egypt has become one of the largest recipients of United States foreign Aid after Israel.
One of the major goals of the united states and its allies is to foster peace with Egypt and Israel and this was made possible and several peace treaties were signed.
Today Egypt receives more than a Billion annually in military aid and other conditional aid.
Today Egypt ranks as the second biggest economy in Africa and is also recognized as the strongest military in Africa.