Sandbox usually means that the games gives the player a lot of freedom to decide what to do during gameplay. For example, games with maps that let you decide where you want to go, and depending on your choices, different game events happen. Additionally, many sandbox games contain things like money or some other metric, that requires the player to do tasks to increase their money, so that they can spend it to unlock the next part of the game that they're interested in. The process of building up money or 'favor' points with an npc, etc, is often called grinding.
By contrast, visual novels are more like pick-a-path stories where events happen in a more constrained order, and players choose what to do at various points during the story.