What's the difference between the Navy and the Department of the Navy?

The United States Marine Corps isn't part of the Navy, but it is part of the Department of the Navy. What's the difference between being part of the Department of the Navy and being directly part of the Navy?
7 answers 7