Giving a virtual machine a bigger disk is a click in the hypervisor. Inside the machine, nothing changes until the filesystem is told about the extra space.
First the partition must be bigger. If the filesystem sits on a partition, grow that one first, for example with growpart /dev/sdX 1 from cloud-utils or with parted. Then grow the filesystem:
resize2fs /dev/sdX1
Without a size, resize2fs grows the filesystem to fill the whole partition. ext4 can do this while it’s mounted, so for growing you don’t need to stop anything. An image file shows it well: a 64M filesystem in a file grown to 128M becomes 32768 blocks of 4K, the full new size.
Check afterwards with df -h.
Growing is the safe direction. Shrinking ext4 can only be done unmounted, needs an e2fsck -f first, and if you then shrink the partition by even a little too much, you cut off data. I’d only shrink with a fresh backup. And this tool is for ext2, ext3 and ext4. XFS uses xfs_growfs on the mount point and can’t shrink at all, while Btrfs uses btrfs filesystem resize max.
On LVM, lvextend -r grows the volume and runs the filesystem resize in one go.
Further reading: resize2fs(8) manual page