How does SAN provides block access to data?

Block access in SAN means, that VM (or hypervisor) have raw access to storage over network without any file system. It looks like raw local attached storage (DAS). Depending on SAN configuration the data blocks may be stored on:

  1. one physical disk (not used in enterprise SAN, but may be configured)

  2. hardware/software RAID array of disks on SAN device (most common situation for SAN)

  3. multiple SAN devices/servers logically combined in one namespace or virtual LUN (CEPH, VMware vSAN)

Is it possible to attach a 5GB block storage to the VM and that 5GB storage is actually coming from different disks?Is that how SAN works?

Not only SAN works like you have described. NAS operates the similar way. The difference between SAN and NAS is access protocol – block (iSCSI, FC, NVMe-oF) or file (NFS, CIFS). For example, you may have NAS with NFS and store VMs on remote NFS share. Here more about SAN and NAS differences - https://www.hyper-v.io/san-nas-public-cloud-lets-pick-secondary-storage/