Module files (.mod extension) are created by compiling the FORTRAN source file which defines them.
If you have a source file named test.f90 which contains the following module definition:
MODULE CONSTANTS
IMPLICIT NONE
INTEGER, PARAMETER :: SECONDS_IN_MINUTE=60
INTEGER, PARAMETER :: SECONDS_IN_HOUR=3600
INTEGER, PARAMETER :: SECONDS_IN_DAY=86400
INTEGER, PARAMETER :: MINUTES_IN_HOUR=60
INTEGER, PARAMETER :: MINUTES_IN_DAY=1440
INTEGER, PARAMETER :: HOURS_IN_DAY=24
END MODULE CONSTANTS
then compiling this file with
af90 -c test.f90
will produce two output files: a module file CONSTANTS.mod and an object code file test.obj (test.o on Linux and macOS). If a module only defines constants then you only need the .mod file to be present when you compile another source file which uses the module through a USE statement. If a module defines variables and contained subroutines or functions, then you will also need to provide the object file created when the module is compiled when you link a program which uses the module.
When a source file defines multiple modules, a separate .mod file is created for each one. The variables and contained routines for all the modules defined in single source are placed in the object file.