Yes, it is ok to lock the car while on a trickle charger. In fact it's preferred way to charge in since most cars have Comfort Access(CA) and the car needs to "go to sleep" in order to have the least amount of draw on your car's battery.
There are connection points under the hood. But with ,ost good chargers you can also hardwire the connectors at the battery or under the hood as well.
I would highly recommend a CTEK unit. Mine ran me about 60 euros off of ebay. Not only do you need a trickle charger... but a unit like the CTEK won't over charge the battery and ruin it. The CTEK's will "cycle" the battery and condition it. It's really worth it.
Some photos on my 135i...