To call a function defined in a .h file from the main file, include the .h file and use the function name followed by values in parentheses to pass the input members to the function. For example, to call a void function taking two double inputs defined in a .h file, include the header and use function(value1, value2) in the main file.