There is a 17 year old girl in my class. She told us that she is actually a boy. I find it confusing! How should I act around her?

It is completely understandable that you are confused.
I suspect many young people feel the same way.
She has told you something important about herself: she feels she is a boy.
Her physical gender is not the gender she feels she is.

We would like to explain it to you:
Who are you? How do you perceive yourself? This is your ‘identity’.
‘Gender identity’ means what gender you consider yourself to be.
If the gender you feel yourself to be does not match your physical gender it is called:
‘Trans-identity’ or ‘Trans-gender’.
That means some girls feel they are boys.
And some boys feel they are girls.
Some people are also born ‘inter-sexual’.
That means their body is neither clearly male nor female.
Some of these people do not feel they are male or female.
So you see: there are a lot of different gender identities!
The best thing to do is to continue treating him as you did before.
Or you can ask what she or he would prefer.
For example, how she or he would like to be addressed.