Yes and no.
On the seller side, Amazon will automatically stop running Sponsored Product ads for any product that is out of inventory. The campaign will appear to still be running but if you look at the individual ads you will see that any ads for products that are out of stock will show in an "Ineligible" state.
On the vendor side, Amazon will automatically stop running Sponsored Product ads for any product where Amazon no longer has the buy box. However, if Amazon is out of inventory on a product, no 3rd party sellers offer it, and inventory is on the way, then the buy box will still appear and shoppers will have the option of adding to their cart to be shipped when it is back in stock. In this case your SP ads will continue to run, although you may see a drop in clicks and a lower conversion rate. At the moment, Perpetua has no way of pulling inventory reports from vendor central so we cannot automatically pause goals based on inventory.
For Sponsored Brand ads, campaigns will continue to run even if one of the featured products is out of inventory. If you want to pause these campaigns you will have to take care of this manually.