I don’t get why there is a separate header file .h for instance declarations and variable declarations, and then in the class file .m I write my classes.
Why not do it like interpreted languages? Just declare a function and reference it when needed. It seems like a lot of duplicate code writing to me and I wish it would make sense to me.
I found this post Cost of Including Header Files in Objective-C and find it instructive.
This is more of a good programming practice/standard than a hard rule. You can of course make declarations in the .m files (try it), just as you would in interpreted languages, but in general we don’t do this because it’s just not as organized.
The other reason is for modularity. But that’s a big fish you need to catch by learning programming basics first 😉