What is the correct way to cite the theorems which grew out of your personal discussions with someone else? Sometimes it happens to me that I have a discussion with someone and he presents part of his unpublished works to me that help improving parts of my research.

Sometimes I use them in a paper in the way that after informing the person, I cite the results in my papers often by attaching that person’s name to his theorems and bringing them as unpublished notes or personal communication at the references. But I’m not sure whether the way that I cite such results is really correct or not.
In this case, if you wish to include a content originated from your peer in your manuscript, you ought to first get his consent. Since you may not be able to cite this in the References section as you cannot cite conversations, you may attribute the originator in the Acknowledgments section regarding this fact.