How many minutes in a year? I knew that there were $365.25$ days in a year (ish) but we only have $365$ on calendars, that's why we have February 29. I then learned in class about the sidereal and solar day; sidereal being $23$ hours and $56$ minutes, and solar being $24$.
When we say "$365.25$ days" which day are we talking about (sidereal or solar)?
My teacher said that the $4$ minutes we gain from the solar day being longer than the sidereal day caused the $0.25$ (ish) more, which causes February 29. I do not see how being $4$ minutes ahead each day already means that we need to add even more time. Surely the $4$ minutes each day, that adds up to $24.3$ hours extra each year, means that we must remove a day every single year, not add one.
What does being $4$ minutes ahead/behind mean for the year?
 A: Very roughly: we make up the four minutes via our passage around the sun.
23hrs 56mins rotation of the Earth keeps the stars in the same place each sidereal day; 24hrs rotation of the Earth keeps the Sun in the same place in the sky each solar day. We're moving around the Sun over the course of the year, so we have to add a few more minutes to account for that.
The four minutes are relevant for things like satellites, which only care about rotation around and of the planet, but for calendar use they are not important as our calendar is based upon where the sun is in the sky.
All this means that you can safely ignore the sidereal day for most purposes; as such, the four minute difference has nothing to do with leap seconds and such, which are all defined in terms of solar days.

When we say "365.25 days" which day are we talking about (sidereal or solar)?

Solar days!
This is basically "random"; there is no (substantial) link between the length of a day and the length of a year; we're spinning as we go around the sun, and it would be quite the co-incidence if we happened to be back to exactly where we started in spin at the same time we're back where we started in orbit.
(This actually can and does happen as a result of orbital resonances, the most famous example being the moon which is almost completely tidally locked. But hey.)
The extra quarter of a day is just down to that, nothing to do with the sidereal offset.

My teacher said that the 44 minutes we gain from the solar day being longer than the sidereal day caused the 0.25 (ish) more, which causes February 29.

Your teacher is wrong.
This is obvious actually, since 44 minutes is nowhere near quarter of a day.

Less waffly summary from Wikipedia article on Sidereal Time:

Sidereal time is a time-keeping system. It is used by astronomers to find celestial objects. Using sidereal time it is possible to point a telescope to the proper coordinates in the night sky.
Sidereal time is a "time scale based on Earth's rate of rotation measured relative to the fixed stars".
Because the Earth moves in its orbit about the Sun, a mean solar day is about four minutes longer than a sidereal day. Thus, a star appears to rise four minutes earlier each night, compared to solar time. Different stars are visible at different times of the year.
By contrast, solar time is reckoned by the movement of the Earth from the perspective of the Sun. An average solar day (24 hours) is longer than a sidereal day (23 hours, 56 minutes, 4 seconds) because of the amount the Earth moves each day in its orbit around the Sun.

There are also some good existing answers on Stack Exchange that say the same thing in different ways (so, if you read them all, you'll have got it!); for example:


*

*https://physics.stackexchange.com/a/300201/17547
And, finally, a useful illustration:

From "COSMOS"; © Swinburne University of Technology (and I'm hoping this counts as fair use)
A: There seems to be some confusion. The number of solar days in a year differs from the number of sidereal days in year by 1--that difference of course being due the 1 revolution around the sun per year influencing the solar day.
Back to the number of days in a year: Baring tidal resonances, there is no reason for the length of a day to be commensurate with length of year; it is what is it: 365.2425
I remember this as follows:
365    day in the year
+1/4   A leap year every 4 years
-1/100 Except on years ending in "00"
+1/400 Unless the year is divisible by 400 (e.g. Y2K)

365.2425
so that 2000 was a leap-leap-leap year.
A: The geocentric illusion
One astronomical year is the amount of time it takes the earth to complete an entire revolution around the sun.  During that time, the earth spins on its axis (approximately) 366.2422 times, in a west-to-east direction.  
This creates an illusion, as seen from the surface of the earth, of the distant stars revolving around the earth, in an east-to-west direction, 366.2422 times per astronomical year.  The sun, of course, also appears to revolve around the earth, in an east-to-west direction, but not quite as quickly as the distant stars.  Because of the revolution of the earth around the sun, the direction of the line joining the earth to the sun changes a little every day, which causes the apparent position of the sun relative to the distant stars to change a little every day.  In an entire astronomical year, these small changes add up to one complete rotation - in other words, the distant stars appear to "lap" the sun in their progression around the earth, exactly once per astronomical year.
We conclude from that that the sun appears to revolve around the earth 365.2422 times per astronomical year - that is, exactly one less revolution than the distant stars complete in the same amount of time.
Sidereal and solar days
A sidereal day is the amount of time that it takes for the distant stars to appear to revolve once around the earth.  That is clearly 1/366.2422 times an astronomical year, and that works out to (approximately) 23 hours, 56 minutes, 4.09 seconds.
A solar day is the amount of time that it takes for the sun to appear to revolve once around the earth.  On average, this is 1/365.2422 times an astronomical year, which is (almost exactly) 24 hours.  This is an average - solar days can actually be up to almost half a minute longer or shorter than 24 hours.  But our time system is based on a "day" that's equal to the average solar day - obviously 24 hours - and therefore we can say that an astronomical year is (approximately) 365.2422 of our days.
Variations in solar day
In general, a solar day is either slightly more or slightly less than 24 hours, and it varies according to the time of year.  There are two different causes for this variation, one with a period of a year, and one with a period of half a year.  The two causes sometimes reinforce each other, and sometimes partly cancel each other out.  
The first reason for a variation in the length of a solar day is the slight tilt between the equator and the earth's orbit.  This causes the apparent direction of the sun's path across the backdrop of distant stars to vary slightly.  At the solstices (June and December), its direction is west-to-east, relative to the distant stars, but at other times of the year, there is either a slight northward or slight southward component to the sun's apparent trajectory.  What this means is that at the solstices, the apparent position of the sun is retreating directly from the apparent trajectories  of the distant stars, which means they are "overtaking" the sun most quickly at that time; and less quickly at other times, when the apparent position of the sun is retreating at more of an angle towards the north or south.  The effect of this is to lengthen the solar day slightly close to the solstices (particularly in June and December) and to shorten the solar day slightly close to the equinoxes (particularly in March and September).
The second reason for a variation in the length of a solar day is the ellipticity of the earth's orbit.  The earth does not maintain a constant distance from the sun.  It reaches its maximum distance in early July, after which the sun's gravity starts to pull it in.  So for the second half of the calendar year, the earth is getting closer and closer to the sun, and also increasing in its speed around the sun.  It reaches its closest approach to the sun in early January, then starts to move outwards again, with the sun pulling it back all the time, and slowing it down.  Therefore, its closest approach is also the time when the earth is travelling fastest; and its furthest distance occurs at the time when it is travelling slowest.  The variation in the speed of the earth around its orbit results in a variation of the speed of the sun's apparent path around the earth.  In December and January, when the sun's apparent trajectory around the earth is fastest, relative to the distant stars, it's slowest in terms of its elevation above the horizon.  In late June and early July, the opposite occurs, and the sun's apparent trajectory is fastest in terms of its elevation above the horizon.  This means that the solar day lengthens in December and January, and shortens in the middle of the year.
These two causes work together in December to produce the longest solar days.  The shortest solar days occur in August.  At other times of the year, such as February and October, the two causes tend to work against each other, and give solar days that are close to 24 hours.  The pattern of long and short solar days is a little complicated, but over the course of the year, the average of 24 hours is maintained.  
Calendar years
Most of the world uses a calendar system called the Gregorian calendar, in which some calendar years have 365 days, and others have 366.  The idea of this calendar is to make the average calendar year close in length to an astronomical year.  It has a leap year every four years, except for three "exceptional" non-leap years every 400 years.  A total of 97 leap years out of 400 gives us an average calendar year of 365.2425 days, which is close an astronomical year.
A much more accurate calendar is the Solar Hijra calendar, used in Iran and Afghanistan.  It also has years of 365 days and years of 366 days, with a leap year occurring either every fourth or every fifth year, in a complicated pattern that spans 2820 years.  The pattern gives us 683 leap years out of 2820, for an average calendar year of 365.2422 days - incredibly close to the length of an astronomical year.
A: 4 minutes a day accumulates to 24.3 hours in a year - ie the time it takes for the earth to rotate once, more or less.  This in essence is why the difference between the sidereal day and the solar day is 4 minutes.  
It has nothing to do with leap years.  These arise because the earth's orbital period is 365.2422 days.  So we have add a day to the year every 4 years, so that things don't go adrift too much - but that over-corrects, so every century, the leap year is omitted.  But then this goes a bit too far the other way, so actually every 400 years (eg 1600, 2000) the century year does have a leap year.  This gets pretty close to 365.2422.
A: The question of the difference between solar and sidereal days has been well covered, but I think I can add a useful bit more on leap years. 
I find the easiest way to understand leap years is to think of the Earth going round the sun for a year. After 365 days it has not yet quite reached the same point in its orbit, and it takes an extra quarter of a day to get there. A day in this case is the interval between two successive occasions of the Sun being due south at any particular place on the Earth*.The next year the Earth is half a day behind, and the next it's 3/4 of a day behind. In the fourth year it would be a full day short, so we stick an extra day in the year so that the Earth travels further along its orbit, enough to get to the same place it was four years ago. 
The "quarter of a day" is not exact, the difference is slightly less so that over the years we advance a bit too far. The exact (very, very close) value is 97/400 of a day short (a quarter would be 100/400 or, of course, 1/4). That difference is corrected by missing out three leap years in every 400, hence the rule about century years. This correction is good enough for many thousands of years, by which time the Earth's rotation and orbit will have changed and a totally different set of formulae will be needed
*Actually the time between successive noons also varies, and I covered that in another answer, see Winter solstice, sunrise and sunset times.
