zero risk, although it is dumb to do. I don't recommend putting any objects that are not sex toys inside yourself. they are not made to be inserted into you and can cut you, which is dangerous. if you're curious, go to a sex shop and buy a toy and lube, dont use a freaking pencil with possible splinters or sharp edges on the metal that holds the eraser on.
No, this is not a risk for any disease. HIV is transmitted, sexually, ONLY by having unprotected anal or vaginal sex. HIV is never transmitted by inanimate objects, even if they have blood on them. A penis must be inside a vagina or anus - no exceptions.
Don't have unprotected, penetrative anal or vaginal sex with someone of unknown HIV status, and do not share intravenous needles with other people, and you will never have to worry about HIV.
Regarding STDs, there's a separate forum for those questions, but STDs stands for "sexually transmitted diseases." Since you didn't have sex, you can't get an STD.
I need to ask you some questions.
1. Why do you think this is a risk?
2. Why do you think there are stds on your pencil?