To learn about the command line arguments for gcc, you can use
$ man gcc
The documentation is very daunting because there are a lot of options. Some experience with man pages will help you quickly scan for the information you need.
The first thing to look at is the SYNOPSIS section at the top. This shows the usage of gcc. Anything in [] is optional. Note at the very end of this section, there is infile.... This means that you must provide at least one file name for the compiler to process. I suspect you are getting an error because you are missing this.
So the correct command line should be
$ gcc -Wall -o <program> <program>.c -lm
This will compile your .c file to an executable with the same name without an extension.
For details about the options you are using, the following comes directly from the gcc man page.
-Wall
This enables all the warnings about constructions that some users
consider questionable, and that are easy to avoid (or modify to
prevent the warning), even in conjunction with macros.
-llibrary
-l library
Search the library named library when linking.
-o file
Write output to file.
The errors you get are due to the -Wall option.
The -lm flag links in a library named "m". This is a math library which you probably don't need to worry about for now. For more details about this library use man libm.
Note that the -o option requires an argument. In your case, this tells gcc the name of the executable to create. (This is the reason for -o <program> in my suggested solution above.)