Linux is compatible to UEFI. The problem with UEFI is just SecureBoot. So you just need to disable SecureBoot in your Bios.
To install Linux (in your case Ubuntu) write the iso image you’ve downloaded to your usb-drive using Win32 Disk Imager (download it from SourceForge).
Then you need to change your boot order in UEFI-Bios, so your computer boots from your usb-drive.
Once if you bootet the Ubuntu live disk, start the Installation (there is an desktop icon for it). Usually it detects your Win 8.1 Installation.
If not, choose the last option (called “something different” or something like that), then choose your efi partition and mark it as efi. Select a free partion or create one for Ubuntu and select the purpose “root” or “/” and for the filesystem use ext4. You can also create a home Partition if you want (select here as purpose “home”.
For the rest of the installation, follow the wizard.
After the installation you will have a different boot manager with an entry “Ubuntu” and “Windows Boot Manager”, if not go to your bios and switch the boot manager from “windows boot manager” to “ubuntu”. But this will only work on EFI (or UEFI).