You can find the manual here: https://cplusplus.com/reference/cstdio/gets/
In short, it gets a string from the standard output. You must exercise caution and not mix gets() with scanf() as they handle end-of-line consumption differently.