how I can do a library?

hello, I am new with arduino and anyone can help me how I can do a library for arduino IDE.

thanks.

Start reading existing libraries - you have the source code for them.

... then create separate .h and .cpp files in your project folder and use functions/methods from such .cpp file in your .ino file
That's not a library yet, but you're close :wink:

Additionally, there's a tutorial in the playground.

A good place to start: