It seems like you're coming up against the Object Relational Impedence Mismatch.
Is a class diagram essentially a database design?
No it isn't, the database model and your OO model may well be very different.
Can we still query the database with SQL just like we do with relational databases?
Yes you can, but you'll change the data into objects, see the Repository Pattern on how to do that.
How is the data file stored and in what format?
The same way and format RDBSs have been storing data for decades, I won't muddy the water by suggesting you look at the growing popularity of NoSQL systems.
Are classes the equivalent to tables and their attributes equivalent to columns?
Not necessarily, you'll be mapping the data in tables to objects in an OO design. Sometimes they might map almost directly. You might also, for example, have the data in 3 tables mapped to one object.