Autism Spectrum Disorders are genetic conditions in which a person’s brain isn’t wired the way a typical person’s brain is wired. It can be thought of as a simple imbalance in the functions of the brain where some functions may be enhanced while others—most commonly the social functions—suffer a deficiency. The way the imbalance occurs affects other wirings in the brain such as those focused on attention, sensory perception, and even the anxiety receptors in the brain (which is why autism is often accompanied by SPD, ADHD, and OCD).
This is also where savantism comes from when certain parts of the brain are enhanced in a specific way that happens to make a person really good in a particular subject—most commonly mathematics and music.
As to why you have it, there are two possibilities. Either one or both of your parents also happen to be somewhere on the autism spectrum or there was a mutation as you developed.
As of right now, there is no actual proof that autism is genetic. However, one can presume it is by strong correlations where children of autistic parents are often autistic themselves.
Feel free to correct me since I don’t have access to the original sources that put this all together.
EDIT: After a VERY long time, there is actually now proof that autism is - at least in part - genetic. Luckily for people with autism so severe they really can’t function (these people do exist, and a lot of auties and aspies seem to forget this), they exist on genes that are edited in early childhood. This means that with therapy early in childhood, an otherwise severely affected autistic will grow into adulthood as an autistic, but one with better executive functions like motor skills (nothing so far can affect our awesome personalities - thank God!).
I saw this somewhere in NewScientist. Can’t remember where though.