Receiving a command over UDP in software is quite simple. But in order to get there, you need to first get Ethernet up and running on your board. Have you already done that or can you find an example project where someone has already done it?
Basically, you want to get the Altera-supplied "Simple Socket Server" program up and running on your board, and then delete everything you don't want and add the things you do want (the UDP receiving of a command and writing to your peripheral registers).
If you're stuck - follow up with what board you have and maybe someone can get you a link to a good starter project for it if the board vendor didn't already.