Though it is possible to edit / force a register's value or input's value and continue to run the simulation for x# of time, when using any simulator like Modelsim, usually you write a test-bench or ***_tb.v code.
Your inputs you wish to drive are usually written into the ***_tb.v source code which instantiates your main ****.v code you are working on.
Here are 2 simple Modelsim example source codes I have created which generate an initial reset pulse and system clock for testing my main code. The instructions on how to run them in Modelsim is included as well as example setup_xxx.do script files which you can learn from.
https://github.com/BrianHGinc/Verilog-Floating-Point-Clock-Divider (Only generates a system clock)
https://github.com/BrianHGinc/BHG_I2C_init_RS232_debugger (Generates a reset and system clock)
My other far more advanced modelsim example which sends bus commands to an old 8 bit programmable sound generator.
https://github.com/BrianHGinc/YM2149_PSG_systemHere, the setup_psg.do / run_psg.do will run my 'YM2149_PSG_system_tb.sv' which has a trick to sending buss controls from arrays.
All my source code projects are fully documented with instructions in their .v or .sv code.
I recommend reading through the ***_tb.v files.
My advanced projects like:
https://github.com/BrianHGinc/SystemVerilog-TestBench-BPM-picture-generatorDemonstrate reading and writing ascii files, like those from spreadsheets, to drive controls for my verilog source code and also demonstrate writing binary generated .bmp photos. This is only for when you really need to go advanced.