At your local police station, for visits from friends or relatives from outside the EU.
The form is only the start of the procedure, the application for the Carta de Invitación. Once filled out and copies of necessary documentation handed over, the police will take care that the application gets processed and the applicant will receive notice of the resolution. If the resolution is positive, you will be invited to come and pick up the actual Carta from the police station. The notification also serves to go and pay the ´tasa´ required. Proof of payment needed when you go pick up the Carta.
The original Carta then needs to be sent to the person invited to come and stay, by mail, as he/she needs to carry the original when he/she comes to Spain.