How can I burn CDs/DVDs in OpenBSD?

Note that this question is addressed in the official OpenBSD FAQ.

CDs and DVDs can be burned from the console using cdrecord from the sysutils/cdrtools package. There is also the sysutils/dvd+rw-tools package, which can be used for mastering +RW/+R and -R[W] DVD media.

An example of using cdrecord to burn an ISO9660 image to disc is:

# /usr/local/bin/cdrecord dev=/dev/rcd0c -data myimage.iso

See the cdrecord(1) manual page and the file /usr/local/share/doc/cdrtools/README.OpenBSD for more information.