This law is known as the War Powers Act.
The War Powers Act was passed during the Nixon administration and was ultimately meant to curb the power of the President in terms of their military capabilities. With this act, the President had the ability to put troops in another country only if it was a national emergency or the safety of the US was in jeopardy. If the President does not get Congress to declare war, then after 60 days he/she must remove troops from the area.