Holocrons are ancient Jedi and Sith objects that held both Jedi and Sith information, teachings, and messages and can only be opened with The Force. Jedi Holocrons tented to be cube shaped, while Sith Holocrons tended to be pyramid shaped.
During the time of the Republic, countless holocrons were stored in the Jedi temple on Coruscant. Most of these Holocrons were either stolen, captured or destroyed in the Great Jedi Purge instigated by Emperor Palpatine.
Ezra Bridger recovered an ancient Sith Holocron from the ruined temple on Malachor, and successfully tapped into the Dark side of the Force to open it.
It is quite possible that in the age of the New Republic, many lost Holocrons were recovered by Luke Skywalker and his allies Lor San Tekka and the Church of the Force. Such stores of knowledge were probably instrumental in helping Luke try to rebuild the Jedi Order.
The Bendu stated that despite their power, holocrons such as the one from Malachor were merely objects that could not make someone good or evil, but rather it was the temptations of power, forbidden knowledge and the desire to use said power for good that drew some down that path that led to evil.
Holocrons, in addition to being stores of knowledge, had another function; when two Holocrons were merged, they could allow a person to see future events or find the answer to any question through the Force. Ezra Bridger and Darth Maul together did such with a Jedi and Sith Holocron, and from it, though Ezra saw only images of what the answer to his question was (the key to destroying the Sith), Maul found the answer to his question (hope); that Obi-Wan Kenobi lived. However, because they did not complete their vision due to Ezra refusing to look at the answers presented in the merging, Maul and Ezra's act destroyed both Holocrons. Ezra still has to keep the pieces