IPv4 (Internet Protocol version 4)
What it is for
Ethernet can only address within one link; it cannot forward a frame to another subnet.
IPv4 gives each host an address tied to its subnet, and routers forward the packet hop by hop toward the destination subnet using a routing table.
A MAC address identifies a network card regardless of where it is attached; an IP address identifies the host's subnet and its number within that subnet.
TTL and fragmentation
(1) TTL: decremented by every router; the packet is dropped at zero. An Ethernet header has no such field, which is why layer 2 needs STP to prevent loops, while a layer-3 packet caught in a loop is dropped when its TTL runs out.
(2) Fragmentation: when a packet is larger than a link's MTU it is split, and the destination host reassembles it (intermediate routers do not).
Common misconceptions
TTL is a hop limit: the field is called Time To Live, but it is decremented once per hop and has nothing to do with time. traceroute sets the TTL to 1, 2, 3... so that the router at each hop returns an ICMP Time Exceeded, which reveals each hop's address.
The header checksum covers only the IP header, not the payload; the TTL changes every hop, so it is recomputed at every hop.
Fragmentation has a cost: if any one fragment is lost, the whole original packet must be retransmitted. Current practice therefore uses PMTUD to avoid fragmentation.