A gym membership is genuinely not a requirement for building real fitness, and plenty of effective options exist for students on a tight budget or without easy access to one, since the actual foundation of a fitness habit is consistency and movement, not a particular facility.
Bodyweight exercises, push-ups, squats, planks, lunges, cover a surprising amount of ground and need no equipment at all, and free, well-structured routines for beginners are widely available online to follow along with. Walking and running are free, require nothing but a bit of space, and are genuinely effective, especially when done consistently rather than in occasional bursts. Any sport you actually enjoy, badminton, football, cycling, basketball, works just as well as a formal workout and is often far easier to stick with, since enjoyment sustains a habit better than obligation does. Hostel and college spaces often have more usable space than people realise, stairs for cardio, an open ground for a quick run or sport, a corridor for a short bodyweight circuit.
Start small and consistent rather than intense and unsustainable, since a short daily or near-daily habit that actually continues for months beats an ambitious routine that burns out in two weeks. Habit stacking, attaching your movement to something you already do daily, right after waking up or right before a meal, makes it far more likely to stick, since you are not relying on remembering or deciding fresh each day.
Example: A student with no gym access built a fifteen-minute bodyweight routine they did right after waking up each morning, using a free video to follow along, and stuck with it for months because it was short enough to never feel like a big ask.
One practical tip: Start with something short enough that skipping it feels harder to justify than doing it, even ten or fifteen minutes of bodyweight movement daily, and attach it to an existing part of your routine so you are not relying on willpower alone to remember.