LyX uses layout files (.layout) to control the appearance of a document inside LyX. This does not (directly) control the appearance of the printed document. The art of layout file construction is in making the on-screen appearance match the printed output at least well enough, and suggestively enough, for the WYSIWYM metaphor to work. Layout files also define which styles (i.e., paragraph layout types) are available when writing a document, and in a very general way how these are handled internally when generating printable output.
See the LyX Wiki for further information.