The syntax is as follows:

:%s/Search Word/Replace Word/Command Flag

Examples:

:%s/sun/moon/g
:12,34s/sun/moon/g
:s/sun/moon/g