It's a plain text file, which can be edited using any text editor, like notepad. It basically contains key=value pair for commands. Sample of autorun.inf file:
[autorun]
open=setup.exe
icon=setup.ico
some other commands which can be written on autorun.inf file
shellexecute=[filepath\]filename
UseAutoPlay=1
This setup.exe and setup.ico should be on root directory of CD.
To test the autorun created by you, refer to Disabling autorun autoplay, to enable autorun for any particular type of drive, for example you can enable for FIXED drives and then test on your C/D/E drives.
For more information on creation of autorun file please refer to wiki page.