Q:

How can I use lock in a multi Threaded app?

Please check my multi Threaded proxy checker codes. it is always checking the same proxies. I think I need to use lock for this? But when I use a lock it is working with just one thread. But normally it is multi threaded. Whats the problem of this?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Threading;

namespace ProxyChecker
{
    public partial class Main : Form
    {

        public Main()
        {
            InitializeComponent();

        }

        private void clearButton_Click(object sender, EventArgs e)
        {
            proxyList.Items.Clear();
        }

        private void clearButton2_Click(object sender, EventArgs e)
        {
            checkedList.Items.Clear();

        }

         Thread[] checkerThread;
        int checking;
        int beenChecked;
        private bool isRunning;
        private delegate void filterProxyHandler(int Index, bool Valid);
        static readonly object _locker = new object();

        private void startButton_Click(object sender, EventArgs e)
        {
            checkerThread = new Thread[Convert.ToInt32(threadBox.Text)];
            checking = proxyList.Items.Count;
            isRunning = true;
            beenChecked = 1;

            for (int i = 0; i <= Convert.ToInt32(threadBox.Text) - 1; i++)
            {

                checkerThread[i] = new Thread(new ParameterizedThreadStart(checkProxys));
                checkerThread[i].Start(i);
            }
        }

        public void checkProxys(object Index)
        {

                int index = (int)Index;

                while (isRunning)
                {

                    if (beenChecked >= checking)
                        isRunning = false;
                    if (index >= proxyList.Items.Count)
                    {
                        checkerThread[index].Abort();
                    }

                    string occoultProxy = proxyList.Items[index].ToString();
                    object[] validArgs = { index, true };
                    object[] invalidArgs = { index, false };

                    try
                    {
                        WebProxy proxy;

                            proxy = new WebProxy(occoultProxy.Split(':')[0], Convert.ToInt32(occoultProxy.Split(':')[1]));

                        WebRequest web = WebRequest.Create(serverBox.Text.ToString());
                        web.Proxy = proxy;
                        web.Timeout = Convert.ToInt32(timeoutbox.Text);
                        web.GetResponse();
                        if (proxyList.InvokeRequired)
                        {
                            proxyList.Invoke(new filterProxyHandler(filterProxy), validArgs);
                        }
                        else
                        {
                            filterProxy(index, true);
                        }

                            beenChecked++;

                    }

                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        if (proxyList.InvokeRequired)
                            proxyList.Invoke(new filterProxyHandler(filterProxy), invalidArgs);
                        else
                            filterProxy(index, false);

                        beenChecked++;

                    }

                }

        }
        void filterProxy(int index, bool Valid)
        {
            try
            {
                if (Valid)
                {
                    checkedList.Items.Add(proxyList.Items[index]);
                    //proxyList.Items.RemoveAt(index);
                }
                else
                {
                    //proxyList.Items.RemoveAt(index);
                }
            }
            catch
            {
            }
        }

        private void stopButton_Click(object sender, EventArgs e)
        {
            isRunning = false;

            for (int i = 0; i <= Convert.ToInt32(threadBox.Text) - 1; i++) {
                checkerThread[i].Abort();
            }
        }

        private void Main_Load(object sender, EventArgs e)
        {
            CheckForIllegalCrossThreadCalls = false;
        }
    }
}

A:

One issue: beenChecked++; is not thread-safe.
Use Interlocked.Increment(ref beenChecked); instead.
Also, 
 checkedList.Items.Add(proxyList.Items[index]);

is not safe. You need a lock() { ... } around this or use a Concurrent Collection. 
For the rest is seems reasonably safe, can't vouch for that though.

But when I use a lock it is working with just one thread.

You didn't post that code so impossible to comment. There are lots of ways to get locking wrong. 

