Can I prove my residence by showing that I lived in an apartment in NY for a year?
Yes. A police officer can use this as evidence to issue a traffic ticket if you drive in New York State without a New York State driver license or vehicle registration. A judge considers the law and the evidence of your intent and decides if you are a resident of New York State.
And what do I have to do before I can get a license?
Before you can get a license, you must apply for a learner permitat DMV office and take the written test. You can prepare by reading the New York State Drivers Manual and taking practice tests.