For me, it varies. Some conventions, I've been going to for a while and have a few regular clients. They'll email me beforehand with ideas and I can have a sketch ready when they show up.
Others are more spontaneous. I've used image search on my phone to come up with drawing reference. I've collaborated with colleagues on drawing ideas. And I've drawn straight from reference that's been brought to me.
I have also seen other artists come to a convention with a set of drawings that they want to tattoo and let the clients choose from that.
I prefer to be prepared and have, at least, a rough sketch ready. Spontaneity is great. But, for me, sometimes the chaos of a convention floor is way too distracting to focus on drawing on the spot. Others thrive in that arena. Depends on what your comfortable with.