Velocity in agile is a simple calculation of number of hours spent to complete a given work. This can be measured in engineer hours, story points and is generally tracked in a tool like jira.

Ex: In a sprint, if there are 3 user stories and each story equals to 4 story points and your team has completed only 1 user story, then the total story points will be equal to 4 story points.

In the same way lets consider another 2 sprints where story points are 10 and 6 respectively.

Here, the average sprint velocity will be (4+10+6)/3 = 6.5