Texture Mapping

Can someone please explain to me or provide a tutorial to teach texture mapping for a simple cube without 3D Api?