A non-stress test is performed later in pregnancy, typically after 40 weeks to determine if the baby is doing well and if an induction might be needed. This is done in the doctor's office and a provider puts a fetal heart rate monitor and a toco (contraction) monitor to make sure that the baby is responding well to both normal state and to any contractions you might have. This is not necessary, but typically encouraged if going past your due date.
A stress test occurs when you are hooked up to the same machine but they put intentional stress on the baby by giving you oxytocin to see how the baby responds to contractions. It is done to make sure that the baby will be able to handle the stress of labor. This is usually done if a non-stress test is questionable and further evaluation needs to be done. Because they are giving you oxytocin there is a risk of labor beginning. This test is also not necessary, but usually there is other evidence to consider doing it.
Again pray for wisdom with these tests, especially the stress test since there is a chance of inducing labor.