What if I use 230 ohm resistor with 5V input to Ground?

The resistor is there to make sure that the pin is connected and pulled-down to ground as its default state. When you close the switch it receives 5V instead. However because your resistor value is so low, it is conducting a fair amount of current. This resistor is meant to limit the amount of current can flow to ground.

As current flows through the resistor it heats up, which is a good indication it should be removed for a larger one.