Your question seems to be the difference between a "Failiure" and an "Error", since both ends up corresponding to an Exception being thrown.
A "Failure" is a place in your test where something that you expect does not happen.
In a test like :
TestedObject testedObject = new TestedObject(); // This is the object we test
boolean something = testedObject.computeSomething(); // The tested method
Assert.assertTrue("Something should be true", something);
// following of the test
If the result of your computation (the 'something' variable), is not true, it means that the computeSomething method is working, but not as expected ; this is a "Failure". The cause is probably a logical bug in the method.
If the computeSomething() method throws an unexpected exception (a NPE in the computation, or whatever), than this also means that the method is broken, but potentially in a more 'brutal' way (a dependency missing, a corner case that is not handled, etc..). There needs to be some exception handling in the method. This would be called an 'Error' in JUnit parlance.
Now, in both cases, it means that the method is broken, and an Exception will be thrown (either by your code, or by the Assert.assertXXX methods) and caught by the TestRunner. It is also not uncommon to simply say in both case that "the test is failing" ; because what matters is that there is some work to be done in the TestedObject to get the green bar back.
Of course, sometimes, you want to test that your code actually throws an Exception, so you would write something like :
TestedObject testedObject = new TestedObject(); // This is the object we test
try {
// The tested method, that is expected to throw an Exeption when given null
boolean something = testedObject.computeSomething(null);
Assert.fail("The computation should have failed");
} catch (IllegalArgumentException e) {
// Pass - This is the expected behavior
}
In this case throwing an exception should cause neither an Error nor a Failure ; it is on the contrary when the Exception is not thrown that the test should fail.