In the resting state, the membrane potential of a neuron is around -70 millivolts (mV). When acted upon by a stimulus, the membrane depolarises as Na+ gated ion channels open and allow sodium ions to rush into the axon, making the membrane potential more positive. An action potential occurs when the membrane depolarises to a certain threshold, if this threshold is not reached the action potential will not be triggered. This is referred to as the all-or-nothing principle in biology: it means that the power of a stimulus is not proportional to the power of the action potential. In simpler terms, the action potential will either occur or it won't, it will not be a graded response.
Example: The resting potential of a neuronal membrane is -70 mV, and the threshold for the action potential is -55 mV. If a stimulus depolarises the membrane to -65 mV, the action potential won't occur, as it hasn't passed the threshold. However, if another stimulus can depolarise the membrane -40 mV, which is above the threshold, this will trigger the action potential.