“PS” is an initialism that is commonly written at the end of documents and emails. It is an initialism of the Latin word “Postscriptum”, which literally translates to “written after” or “after text”. It is used when something is being appended to an already completed text. It is also used to draw attention to footnotes, an addendum, etc.
In emails, “PS” is usually written after the sender’s signature, and can be used in both formal and informal contexts.
Generally, “PS” is used to add something that was excluded in the main body.
Both “PS” and “P.S” are correct when used.