How exactly are genes swapped during the process of recombination?
There is quite a few misunderstanding in your question. So, I'll shortly give you some (simplified) definitions and then point you to another post.

Definitions and Basic Concepts

A locus (plur. loci) is a position along a chromosome. A some loci, there are  genes. To make things easy a gene is any sequence which is transcribed into RNA and translated into proteins.

Now at any locus, you might see different individuals having different variants. For example an individual may have the sequence ATTCT while another individual may have the sequence ATTGT. Those different variants are called alleles. It is key to understand that there is genetic variation in populations. This genetic variation is a big part of the reason why people around you look different and why you ressemble more your siblings (if you have any) than a random person in the population.

How does recombination have any impact?

To understand the effect of recombination you necessarily have to picture a several loci model. As you now understand the above definitions you will find your answer at this post: Why do we need two markers to measure a recombination rate?

Further readings

The following posts will also be of interest to you:


Do only one or both pairs of homologous chromatids exchange genetic material during the process of crossing over?
Chromosome and chromatid numbers during cell cycle phases