Succinctly: Go back to where you learned about the command for the first time (be it a person or a web page) and see if he/she/it can tell you.
More verbosely (since I got a downvote on this answer I'm guessing it's because I came off as glib, sorry): you put that command in the document for a reason. Either somebody suggested it or you found a code snippet on a web page somewhere. That same person/page should also know what package needs to be included to make it work.
Example 1 You are following the advice of your colleague, let's call him...Martin. But because the conversation took place in the hallway you couldn't write down the actual code required.
"Hey, Martin, you remember how you told me I could use \snarfbbf
to snarf the bumblefrack?"
"Yeah."
"Well, it doesn't work. It says the control sequence is undefined."
"Did you include the bbfrack
package?"
"Oh, I get it. Thanks."
Example 2 Somebody (let's call him...Stefan) writes a blog post about snarfing bumblefracks in TeX documents. You copied-and-pasted a code snippet from part of the post. But because you didn't copy the preamble you have missed the required packages.
Go back to that web page, where either the complete document or a note about which packages are required should be there. If not, ask the blogger.
latexdef --find
but it only works if you already know which package you should include, so doesn't apply here.