I am a new one!

Trying to program for a first time…

I need to program arduino when input 1 is low to send 1 pulse 500 mS to digital output (d13)

input 2 is low to send 2 pulse 500 mS to digital output (d13)

input 3 is low to send 3 pulse 500 mS to digital output (d13)

input 4 is low to send 4 pulse 500 mS to digital output (d13)

e.t.c

Thanks in advance this is my first project with arduino and like to understand how it works…