Hello Saurabh,
Tasks are a “point in time” (no duration) record of an activity, such as a logged call, a reminder, an email, etc… It can be in the future and they also have due dates and statuses (not started, completed, etc…).
Events have a start and end time, which tasks do not. They can have invitees (Tasks can’t) and by default do not have a status and they show up on your callendar, as a time block to represent the duration.