First, research different types of bike locks to find the best one for your needs. Then, make sure you use it properly and securely lock your bike in designated racks or bike parking areas. Using a U-lock to secure the back wheel and frame with an additional cable through the front wheel can help prevent theft.
Find more information about bicycle parking here.