How to connect Processing to Arduino?

Can somebody tell me how do I put a code from Arduino in Processing?

Basically you can’t. Processing is a Java like language. While Java has a C like syntax it is not C.
The Arduino uses C/ C++.

Now what do you actually want to do?

In my code I calculate a speed and an acceleration and show them on the serial port, so I want to create on Processing a box or window where I can show more beautifully the speed and acceleration

Connect processing on your computer to that Serial port, read in the data, and display it in whatever pretty method you like.

And which are the code lines that are used for that?

In Processing, in the Files menu there are examples. Look at the simple read example in the examples for Serial. It has the Processing and the Arduino code for very simple serial communication. That is a start.

Here's a useful tutorial.