They are tests that determine whether you meet the qualifications necessary to succeed in the role. The exams differ depending on the type of role you’re applying for (e.g. a Management Assistant exam differs from a Systems Analyst exam). They often include math and verbal skills, similar to an SAT.
If you would like to have a regular/civil service job, you must take an exam unless it is an emergency appointment.