An assertion failure is when the program fails a tst to assert that it is functioning properly.
In your case, accessing an index that is out of bounds fails the test that the index must be in bounds. This check is only in debug mode because it would cause slowdown in release.