I use custom 1 inch margins for most of my homework but for some reason LyX likes to ignore the margins sometimes, for example:
I don't know why it keeps doing this it happens in a lot of my homework, any ideas?
In this case the problem is that the Typewriter family is set as the default font family in Document --> Settings --> Fonts. TeX does not hyphenate words set with
\ttfamily, and (mentioned by egreg) the inter-word spacing has no flexibility. This causes some words to stick out into the right margin. Changing the default font family to Roman (or Default) should fix this.
\sloppy to the beginning of your document.