C-h m gives you help on the current mode, and it typically tells you the name of the command that turns the mode on.
For example, in Emacs-Lisp mode
C-h m tells you that you are in
Emacs-Lisp mode. The command that turns the mode on is just
C-h m also provides a link to the library that defines the mode, and if you click on that link it takes you to the definition of the mode command. For example, in Emacs-Lisp mode
C-h m tells you:
Emacs-Lisp mode defined in `lisp-mode.el'
And if you click the link
lisp-mode.el then Emacs takes you to the definition of command
emacs-lisp-mode, which is the command that turns the mode on:
(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp"
"Major mode for editing Lisp code to run in Emacs.