You use in spite of when you are mentioning something that surprisingly does not prevent something else from being true. The spelling is in spite of, not 'inspite of'.
Be Careful!
Don't use 'in spite of' to say that something is not affected by any circumstances. Don't say, for example, 'Everyone can take part, in spite of their ability'. Say 'Everyone can take part regardless of their ability' or 'Everyone can take part whatever their ability'.
Be Careful!
Don't use 'in spite of' as a conjunction. Don't say, for example, 'In spite of we objected, they took our phones away '. Say 'Although we objected, they took our phones away'.
Despite means the same as in spite of. Don't say 'despite of'.