Do you have any one that the cat trusts that can help you hold her? If the mats are bad enough that they can't be combed out they'll need to be trimmed. You need to make sure she can't move around at all, you would not want accidentally cut her.
You'll need to get your fingers in there and find out where fur ends and skin begins, then start by cutting through the mat itself with a pair of scissors. Start near the end of the mat or in the middle, not near the cat's skin. Be very careful not to cut your cat's skin! Trim as much of it off as you feel safe doing then try combing/picking out the rest. Try your best not to pull fur, it's difficult but if you can be gentle your cat may not get as upset.
In the future, brush the cat daily as was suggested. Mats do hurt the cat, they pull fur. Do not let her fur get like that again.
2 years ago a neighbor's long haired cat came for a few visits when I noticed it was horribly matted, with stickers in the mats. I was able to remove her mats by trimming them out. Her coat was a mess after but at least the poor thing could lay down.