In most cases, they are the same in content. However, the preprint could offer more freedom in terms of format. For example, the short communication format of many journals has strict guidelines for length, formatting and often has only a paragraph of introduction and conclusion. However, in a preprint, you could extend the introduction, conclusion and references to provide more context for the work. Additionally, a preprint can be uploaded in a single PDF file without the complicated forms for uploading separate images that are common for journal submissions.
Furthermore, preprints do not need to be tied to journal submission, meaning that you can post a complete scientific manuscript and continue to revise it until you are ready to submit to a journal.