I see word NASM, MASM, Intel, AT&T. I am confused between them. Is it different types of assembly?
You are confusing several things.
gas (GNU Assembler) are tools that compile an x86 assembly text file into an executable. Each of them do have a specific syntax to specify your program. But, they share a lot on assembly instructions.
Then, Intel et AT&T are specific syntax to write x86 assembly programs. In fact,
masm use the Intel syntax, where
gas is using the AT&T syntax.