In the situation you describe, the paper would probably be singly authored, and the author would write something like "Thanks to my advisor _____ and to my colleagues ____ for many helpful discussions" in an acknowledgments section.
If the contributions were more serious, then possibly the author would invite the others to co-author with him/her, and the others would then either accept (and then help write the paper) or politely decline and say "just mention me in the acknowledgments".
At least in my experience, co-authorship carries responsibilities: to help with the writing, the figures, references, dealing with editors and with submission to journals, speaking about the research at seminars/conferences, etc.