You need to make sure you are setting up your spin bike correctly, first. You've either got the seat post too high or low, or the fore/aft adjustment is off, i.e. too far from the bars or too close. One of the issues with spin bikes is the range of adjustments you can make is not that great, as opposed to a real bike. The cranks are often too long for shorter women, causing knee and hip pain. Ask your instructor to help you with the bike set up.
It's possible you are using too much tension on the bike relative to your anatomy and level of fitness. It would be no different than than doing a ride with steep climbs outside, if you were not really in shape for that, without the normal building up to do that. Rest for a couple of days, keep your knee elevated when you can, ice it for short periods throughout the day. If it doesn't resolve, get it checked out by an appropriate medical provider.