You would have two columns: Names and Gender
Names Gender
Jim Boy
Jane Girl
Jack Boy
Etc
1. Make sure each column has a header title on the first row - row 12. Select all cells by tap/click top left cell/square (the one below 'fx' and above '1'). All cells should now be selected.
3. Tap/click: Data > Sort the range > Tick data has header rows > Select the column in the pull down box that you want to sort by and tap/click Sort. In your case this would be 'Gender'