Taylor Swift attended “cat school” to learn what Jellicles can and Jellicles do. To prepare for “Cats,” the big-screen adaptation of Andrew Lloyd Webber’s 1981 musical, Swift and her co-stars enrolled in classes to master the movements of their four-legged characters. In the film, Swift plays Bombalurina, a rabble-rousing outsider who sprinkles catnip over the Jellicle ball.

Swift didn’t phone (or meow) in her performance in “Cats,” starring Idris Elba, Jennifer Hudson, Jason Derulo, Ian McKellen and Judi Dench. She wanted to be ready for her big number, “Macavity,” and in case Lloyd Webber enlisted her to write a new song for the movie. When he did, their collaboration was fast and easy, in the form of “Beautiful Ghosts,” a confessional ballad performed by the stray cat Victoria (Francesca Hayward) that serves as a bookend to “Memory,” the production’s signature song (belted out by Hudson).

On the morning that “Cats” premiered in New York on Dec. 16, Swift still hadn’t watched the movie. She was eager to see how director Tom Hooper’s “digital fur technology,” a lengthy post-production process where the human actors were turned into cats, would look. Swift spoke to Variety about all things “Cats.”

How did you first hear that Tom Hooper was adapting “Cats” into a movie?

Well, actually, it started a long time before that. When he was making “Les Misérables,” he called me in for Cosette [later played by Amanda Seyfried]. And I said, “I’m not a soprano, but I loved Eponine’s song, so can I audition for Eponine?” I went through the whole process of flying to London. I did a screen test with Eddie Redmayne and pretended to die in his arms, which was fabulous, but I didn’t get the role and [Samantha Barks], who played it on the West End, got the role and was absolutely phenomenal. But I had a really great time with it. I just thought, if I ever got a chance to work with him, I know that would be a great experience. He came straight to us with the offer for the role this time. I didn’t do any screen tests.

And you said yes?

I said yes right away. You have to dislocate the end result with your experience and you have to commit to doing it only based on what you think the experience will be and if the experience will teach you things that enrich your life. So that’s exactly what I thought this would be, which is getting to work with the best dancers and performers in the world, getting to perform live on set, getting to work with one of the best directors out there, the most amazing producers and team of Andrew Lloyd Webber and [choreographer] Andy Blankenbuehler. What more could I possibly ask for in an experience? And so that was what made me immediately commit.

How did you get into the mindset of your character?

It was really fun being on set because they had sort of an animal behavior class called “cat school.”

They did?

We would literally do hours on end of barefoot crawling on the floor, hissing at each other. We learned about cat instincts and the way they carry themselves and the way that they process information, the way they see the world, the way they move. What’s strange is from the very beginning of the whole process, everyone on the director/choreography side of it had decided that we weren’t going to be crawling all the time and we weren’t going to be walking all the time. We were going to be hybrids in both our appearance and our behavior and movement. Which was so funny because you’d walk on set one day and they’d be like, “Oh we have to redo the choreography! It’s a little too human today. We need to make it more cat today.” Or they’d be like, “It’s a little too cat and not enough dance, so we need to dial back the cat and make it more dance.” And it just was so funny because regardless of what the end result is, there’s just never been a movie made like this, which is why it was so fun to be a part of.

How did you work on your hiss?

I’ve had that down since I was about six years old. Don’t you worry.

Did you attend a lot of “cat school”?

I came in, I’d say, four times more than I was scheduled to be there because I wanted to be a part of it. I’m a singer. This is not really my forte. I wanted to be there as much as possible and just get the hang of it and have my choreography down and have my song memorized and work on the dialect. And what ended up happening was I ended up being around the cast almost as much as one of the principal cast members who danced in every scene. I was around people a lot, got to know everybody, which really was amazing. But what ended up happening with me kind of loitering as much as I did, was that I ended up writing a song with Andrew Lloyd Webber.

You weren’t asked from the beginning to write “Beautiful Ghosts” with him?

No. From the very beginning, they thought that it didn’t make sense that Victoria, Francesca’s character, is essentially the narrator and the lead character of the film. But we never hear from her. She never says what she’s feeling or going through. She never sings in the original musical. And Andrew had said he was so rushed during the 1981 version and it was essentially a workshop that took off and went viral — the 1981 version of viral — which became very successful very quickly.

And he had said to me that was the one thing that he would have done differently. He would’ve given Victoria a chance to actually say what her experience had been rather than just simply dancing. So this was kind of an opportunity for him to go back and add that. I think that they were working on some kind of idea for the character to sing a song, but they didn’t know what they wanted the song to be. And one of the reasons why I was on set every day was I wanted to really get to know that character because if anyone should ever call me to help with the song, I wanted to know what I was doing. And by the time someone did say, “Oh, Andrew wants you to go over to his flat to rehearse,” I kind of had in my head like, “I hope he asks me to write on this because I know exactly what I would want her to say.”

And he did. As soon as we were rehearsing, he started playing a melody that I knew wasn’t in the version of “Cats” that I had seen. I knew immediately it was a new melody and I was like, “What is that you’re playing?” And he said: “Well it’s a new song. We are hoping for Victoria to sing, but we don’t know what we want her to say.” It was just that the dream of what I was hoping he would say, because then I could just jump in and help.

Did the song have a name at this point?

It didn’t have a name and it didn’t have any lyrics. It was a beautiful instrumental piece.

Did you write it quickly?

I came up with the verse and chorus right there in his office, and we decided that for the bridge, I would take it home and we would write at his country house, which was the best idea. I got to go there and play the bridge I had written and then have an amazing Sunday roast and meet his whole family who are the loveliest people ever.

The song was just nominated for a Golden Globe.

It feels really great. It’s so awesome that they nominated us because this is a song that I feel like is pivotal to the story. I don’t think the movie is the same without the song. Sometimes you see a situation where a song is stuck in a movie and it enhances it a little. This is imperative to the narrative of “Cats.”

Would you be interested in acting in more movies?

Sure. We’ll see how this goes. I mean, honestly, I love my job so much. I love writing songs and singing them. I love that so much that this was for me a really special, strange, weird, exciting experience to get to have. And if there was something that came up that was really interesting in a different way, that would be cool. But I really just want to do things that enrich my life and I want to have adventures and I want to do things that I’m curious about. It’s kind of just where I am.