(Note: The discussion below pertains to journals only. There are other categories of research literature including technical reports, case studies, conference proceedings and others. These are generally not peer-reviewed but can still be more-scholarly sources than can popular or trade sources.)
What is the difference between these 2 publications?
They both come out once every month. They're both in English. Both published in the United States. Both of them are "factual".They both have pictures. They even cover some of the same topics.
The difference is that one--Oceanography--is peer-reviewed, whereas National Geographic is a popular-press title.
Peer review is scientists' and other scholars' best effort to publish truthful, reliable information. Each article has been submitted for publication, but then reviewed by other scholars in the same field to ensure that it is sound science. Among other things, peer-review checks to make sure that:
It isn't a perfect system: Scientists make errors (or commit fraud) as often as any other human being and sometimes bad articles slip through. But in general, peer-review ensures that many trained eyes have seen an article before it appears in print.
Peer-reviewed journals are generally considered "primary source" material: When a new scientific discovery is made, a peer-reviewed journal is often--but not always--the first place it appears.
Popular and trade publications are not peer-reviewed, they are simply edited. That does not mean they are any less potentially truthful or informative--most popular and trade publications take pride in careful fact-checking. But when the topic is scientific research, the information is generally "secondary": It has already appeared elsewhere (usually in a peer-reviewed journal) and has now been "digested" for a broader audience.