Note: This tutorial shows you how to unwrap a 3D model into a 2D image using seams, but if you have a complex object you may use the "Smart UV Project" option. Before you export you object, select it and go into Edit Mode by hitting the TAB key. Go to the Material tab and select the material that has the texture. Click on the select button, verify that all vertices that are assigned to the texture become highlighted. Then hit the "u" key and select "Smart UV Project". You will have to do this for all materials assigned to a texture. Then you can export your model. You know that your object has been properly exported if you open your .obj with a text editor and see lines that start with "v" (vertex coordinates), "vn" (normals), "vt" (texture coordinates) and "f" (faces composed of 3 vertices//normals).
Reminder: To export a model from Blender in .obj format, select File->Export->Wavefront(.obj). Under Operator presets unselect all checkboxes and then select "Include Edges", "Triangulate Faces", "Write Normals", "Include UVs" (necessary if you have textures), "Write Materials", and "Objects as OBJ Groups". Then click the "Export OBJ" button.