To create a gang you'll need two players at lvl 10 or higher, and 750g. You can register your gang at the Gang Registration Office near the S7 south gate.
Gangs have a preset command structure. Type /members to see your gang's chain of command, as well as online and offline members. Gang leaders will be able to promote, demote and kick members, even when they're offline. They can also set a gang MOTD (/setgmotd).
A general (gang leader) who leaves the gang without a lieutenant (second in command) in place will disband the entire gang indefinitely. If a general leaves while the gang has a lieutenant, the lieutenant will be promoted to general.
For more info on gang registration, see the in-game gang registration manual.