Just to be clear ... yes, this is a "bad" term based on its origin, which is a direct reference to a sex act. However, it is used so commonly now, even by young children speaking to adults, that we have become desensitized to it. You will hear it at all levels of casual conversation in America.
But a note of caution: Some of us in the "older generation" still cringe when we hear it used so blatantly, although there is little we can do about it. I would say avoid it in formal conversations with your elders, in job interviews, etc.
To answer the grammar part of your question, it is a verb (see reference to sex act above). I respectfully decline to offer you any sample sentences. Just google it.