The short answer is that you don't. I can only imagine that your friend was having a little joke. I don't count myself as an expert, though I have a large collection of music of all sorts, and quite a library of books on music. Nor do I consider myself particularly intelligent. In my view it is folly to attempt to classify what is or what isn't 'jazz' - or any genre, come to that. It comes down to what connects with you. As Mike says, 'jazz' is a very deep pool. Even within the output of one musician - John Coltrane, for example - you have what might pass as 'smooth' (his work with John Hartman) through to his later experimental work (which I find pretty challenging). Personally, I can't connect with much of what is termed 'Free Jazz', so I don't bother listening to it. But do I manage to get along quite happily listening to everything from Jelly Roll Morton, or Louis Armstrong's Hot Fives and Sevens, through to the Ezra Collective, Robert Glasper, Ambrose Akinmusire, Yussef Dayes, etc., without losing sleep over whether or not it counts as 'jazz'.