Make sure your battery is fully charged and it's the correct model if you have purchased a new battery. The battery should be an EN-EL14a Rechargeable Li-ion Battery or EN-EL14 Rechargeable Li-ion Battery.
Locate the battery compartment on the bottom of the camera directly below the mode dial.
Find the marked arrow on the battery compartment door and firmly push following the arrow's direction to release the latch.
Release the latch and allow it to completely open.
Insert the battery by following the diagram on the inside of the compartment door.
Close the compartment door and firmly press on the latch until you hear a clicking sound.