I want to know which one is suited when I try to create a package file or a class file?
Use the appropriate macro for the appropriate case. That is, use
\ProvidesPackage for a package (typically a
\ProvidesClass for a class (a
\ProvidesFile for anything else.
\ProvidesPackage does additional checking in terms of the name used by the package and that used with
\usepackage. However, it also stores a package "version" if is it supplied:
This can be used to make sure loading of packages meet a version criteria, if needed.