Many ways to use. First, one can use File –> Export –> LaTeX (pdflatex). The .tex file is saved in the same folder as .lyx file.
The second way is a little bit more complex, but can be useful. Follow those steps.
Open Tools –> Preferences
Within the preference windows, go to “Paths” and change both “Working directory” and Temporary directory to something easy to find such as “C:\Users\LyX” (create the folder first if not existing). See the figure below
Restart LyX and open the LyX file. Compile the LyX file to make sure everything works.
Then go the directory your created in Step 2 such as “C:\Users\LyX”.
Within the directory, you will see temporary folders starting with “lyx_tmp”. Browse to the latest folders and you will see a list of files with .tex file, .bib file, and other files.
The folder provides all information you need for your latex version of the document.
If you have used .bib file, there will be .bbl file whose content you can copy to .tex file. Then, you don't need the .bib file any more.