That can heavily depend on what medium of art you're using. Pencil, paint, charcoal, digital art, etc. all have different techniques even if the end result is more or less the same. I'll assume you're talking about pencil though, since that's what most artists start drawing with.
The best way to figure out texture is to just to play around with using your pencil in different ways. You don't have to draw anything specific in order to practice it; just try covering some square inches of paper in texture swatches. Drawing with the tip of your pencil will give you sharp, hard lines. Drawing with the flat side of your pencil will give you smoother, very thick lines. Find out what happens when you draw a bunch of long thin lines. Find out what happens when you draw a bunch of short thin lines. Find out what happens if you make a random combination of long and short lines. Try thin lines, thick lines, light lines, dark lines, making dots with the point of your pencil, and try combining any or all of these together to see if they look different. Try spacing the lines/dots out farther apart or closer together. Try using your finger or a blending stick (if you have one) to smudge lines or patterns together. Try drawing out these patterns and then using an eraser to remove random areas from the texture swatch.
Consider the way the nature of the surface you're drawing and experiment. Bumpy or rough surfaces have more visible texture, smooth surfaces will have less visible texture. Here are some examples that may inspire you:
As for drawing from your head instead of reference, it mostly just takes practice. As you draw from reference, you'll learn where things are supposed to go and how they are supposed to look, as well as the basic shapes to start from that will allow eventually allow you to draw anything.
Actually, as I write this, I'm reminded of a very useful tutorial I found somewhere that would probably help you even more:
http://img.photobucket.com/albums/v629/magicalcow17/HowtoDrawAnything_zps05015671.jpg