Most OS installers including the Ubuntu/Debian installer will create and enable a swap partition if you select all of the default options in the installer, in particular if you use automatic/guided partitioning.
If you use manual partitioning at installation time or if you retain the partition table that already exists on the disk, then it's up to you whether you create a swap partition or not. If you create one and/or designate one, the installer will most likely enable it.
You can check
/etc/fstab to see if a swap partition is configured. Look for an entry with type
swap. If there is one configured, it should get enabled at boot time. Check
/proc/swaps to see if it is really enabled.