How do people have internet access on their iphones?

When the teachers let us use our phones and stuff they use the internet without a problem but my ipod touch won't let me on the internet when I'm at school. And they don't even need a password

They are using 3g or 4g data
Its internet built into their phone

Because their phones have a data plan?

your ipod touch does not have a data plan. It runs off Wi-Fi.

Well, Iphones can make there own internet so they really don't need password… But ipod touches can't… And also because of there data plans