Al-Hakim was a hadith scholar and hafidh from the 4th century he was a student of ad-Daraqutni and a teacher of imam al-Bayhaqi.
What he did (or at least intended) in his book al-Mustadrak was compiling ahadith according the conditions of both sahih authors (al-Bukhari and Muslim), which neither of both have quoted. This means he in first place considered ahadith which were not quoted in the two sahih books, but have the same or similar or accepted narrator chains as they already exist in sahih al-Bukhari and/or Muslim!
And he finally added to his compilation some ahadith which based on his "ijtihad" should be considered as sahih. This is to some extent described by the full title of the book "Supplement for What is Missing From al-Bukhârî and Muslim".
Maybe an important side note:
One should know that some of the scholars in the chains of both sahih books are considered as weak (or worse), but most of those where teachers of al-Bukhari or Muslim, so they must know them better, and have their reasons for rejcting or affirming some of their narrations. And even the sahih books don't exclude weak ahadith!
However the majority of scholars says that al-Hakim was very lenient in his qualification, so that the book includes many weak (da'if) and fabricated (mawdu') hadith. Some even accused him of being a shi'i, for example ibn Hajar al-'Asqalani wrote (in lessan al-Mezan) that in the last days of his life he changed (apparently at the time he compiled this book). Imam ad-Dhahabi later compiled an abridged book and called it Talkhis al-Mustadrak' with commentaries on the ahadith.
قال الذهبي عن الحاكم في "ميزان الاعتدال" (6\216): «إمامٌ صدوق، لكنه يصحّح في مُستدرَكِهِ أحاديثَ ساقطة، ويُكثِرُ من ذلك. فما أدري، هل خفِيَت عليه؟ فما هو ممّن يَجهل ذلك. وإن عَلِمَ، فهذه خيانةٌ عظيمة. ».
Imam ad-Dahabi said in "mezan al-'itidal": a sincere Imam, but he qualified as sahih in his Mustadrak ahadith which are droped, and he does this a lot. And I don't know why, has this been hidden for him? He isn't among those who should ignore those, so if he knew it, this would be a great betray. ..."
قال النووي : «الحاكم متساهل كما سبق بيانه مرارا ».
Imam an-Nawawi said in his majmo': "Al-Hakim is lenient as frequently quoted/explained before"
Ibn Hajar even quoted a statement of a scholar who pretended that there are only three ahadith in the whole book which are based on the conditions of al-Bukahri and/or Muslim.
However a more realistic quote comes from ad-Dahabi's siyar a'laam an nubala' I'll only summarize in the following describing al-Mustadrak and commenting a negative statement about the book:
وسمعت المظفر بن حمزة بجرجان سمعت أبا سعد الماليني يقول طالعت كتاب المستدرك على الشيخين الذي صنفه الحاكم من اوله إلى آخره فلم أر فيه حديثا على شرطهما
قلت هذه مكابرة وغلو وليست رتبة أبي سعد أن يحكم بهذا
بل في المستدرك
1) شيء كثير على شرطهما
2) وشيء كثير على شرط أحدهما ولعل مجموع ذلك ثلث الكتاب بل أقل فإن في كثير من ذلك أحاديث في الظاهر على شرط أحدهما أو كليهما وفي الباطن لها علل خفية مؤثرة
3) وقطعة من الكتاب إسنادها صالح وحسن وجيد وذلك نحو ربعه
4) وباقي الكتاب مناكير وعجائب
5) وفي غضون ذلك أحاديث نحو المئة يشهد القلب ببطلانها كنت قد أفردت منها جزءا وحديث الطير بالنسبة إليها سماء وبكل حال فهو كتاب مفيد قد اختصرته ويعوز عملا وتحريرا
- in al-Mustadrak there are many chains which go ahead with the condition of the two sheikhs (al-Bukahri and Muslim).
- and many chains going ahead with the conditions of one of both and it is about a third of its content, or less as many of those are only apparently based on their conditions (one of them or both), but they include a hidden or secrete weakness (insanity).
- a quarter of his book includes chains which are hassan, useful (salih), or good (jayyid).
- The rest of his book are bizarre ('ajaaib) and rejected ahadith (manakeer).
- And among them are a hundred of ahadith which the heart would reject... in any case it is a useful book which i have abridged and which need more work (consideration) and compilation (commentaries).
Note that scholars said that among those ahadith quoted in al-Mustadrak there are ahadith which are quoted in both sahihs. For example he stated in one place in his book that Muslim quoted this hadith abridged based on the chain of Sho'aba from Qatadah -see here- (which is not the case, as Muslim also quoted it with the chain Hammam from Qatadah -the first link which is actually indicating the hadith-), while saying in an other place this is a sahih hadith but they (al-Bukhari and Muslim) didn't quote it. This shows that al-Hakim must have been at least forgetfull at the time he wrote his book or heedlessness has occured to him when he reached the age of 80 years...
From all this the best we can say is that al-Hakim did a big effort to find sahih ahadith which are not quoted by al-Bukhari and Muslim and succeded to some extent and failed to some extent maybe due to his forgetfullness, his heedlessness which came with the age he began compiling his book at or maybe he even intended to create some kind of disturbance, but we have not enough evidences for the later and should assume the best.
Therefore it is not recommended to take his hadith as an evidence unless scholars like ad-Dahabi or others qualify them as authentic enough!