By relaxing smooth muscle in the vessel wall, they produce an increase in diameter which in turn increases the volume of blood flowing through them. Both of these chemicals act similarly, relaxing muscles and reducing blood pressure. Later, Nitroglycerin was discovered to have similar effects and became one of the most common heart medication prescribed in the 20th Century, replacing Amyl-Nitrite because it had fewer side effects and was easier to administer. One recent issue where the two have been confused is in news reports that heart patients died after taking Viagra with oral nitrate heart medication. The interactions between nitrates and Viagra are well known and thus amyl-nitrite is automatically lumped into the same group.
Caution is obviously advisable.