"Now the purpose of the commandment is love from a pure heart, from a good conscience, and from sincere faith, from which some, having strayed, have turned aside to idle talk, desiring to be teachers of the law, understanding neither what they say nor the things which they affirm" (I Timothy 1:5-7).
"Idle talk" translates the Greek word mataiologos. It is a compound word of mataios, which means vain, useless, idle, empty, worthless or foolish, and lego, which means to speak. What Paul is saying is that some have turned away from the teachings of God's law, and substituted it with worthless words, which have no real meaning.
There is a similar word used in Titus 1:10, "For there are many insubordinate, both idle talkers and deceivers, especially those of the circumcision, whose mouths must be stopped, who subvert whole households, teaching things which they ought not, for the sake of dishonest gain." Here Paul gives us an example of "idle talk." There were Judaizing teachers who were teaching senseless things, such as the keeping of the Old Law by Christians.
"O Timothy! Guard what was committed to your trust, avoiding the profane and idle babblings and contradictions of what is falsely called knowledge -- by professing it some have strayed concerning the faith. Grace be with you. Amen" (I Timothy 6:20-21).
"Remind them of these things, charging them before the Lord not to strive about words to no profit, to the ruin of the hearers. Be diligent to present yourself approved to God, a worker who does not need to be ashamed, rightly dividing the word of truth. But shun profane and idle babblings, for they will increase to more ungodliness. And their message will spread like cancer. Hymenaeus and Philetus are of this sort, who have strayed concerning the truth, saying that the resurrection is already past; and they overthrow the faith of some" (II Timothy 2:14-18).
Here "idle babbling" translates the Greek word kenophonia. It too is a compound word of kenos, which means empty, and phone, which means sound. In other words it refers to talk that has a lot of noise, but carries no meaning.
In I Timothy 6:20-21, Paul says there are some teaching false doctrines while calling it "knowledge." Most likely he is referring to gnosticism, which means "knowledge." Early in the church there were groups claiming to have special or secret knowledge that was only given to special people. See Who Are the Gnostics? for more details.
In II Timothy 2:14-18, Paul gives another example. There were people going around claiming that Jesus' second coming had already taken place. This teaching had no benefit to those who listened to it.
So neither of these phrases are referring to works of fiction. They are describing the worthlessness of false teaching, which is "justified" by empty rhetoric.