Installing ubuntu 18.04 by removing windows 8.1

"Erase everything and install Ubuntu" will do what you want - erase the entire disk and use it for Ubuntu.

The remainder of my answer is for future readers, elaborating on the case where other partitions that need to be preserved exist on disk. Then it will be easiest to first remove the Windows partition using partition software, e.g. "Gparted" or "Disks" started from within the live session. You then can start the installer from the live session, and select the option to use the free space.

Finally, the installer has the option "Something Else". That puts you in manual control. The option brings you in a partition editor, where you still can remove e.g. the Windows partition, then create one or more partitions as you see fit. This option is more technical than the previous two options, where an automated default configuration is set up.